Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java

Issue 29709555: Issue 6418 - Override `onShowFileChooser` method (Closed)
Patch Set: Created Feb. 26, 2018, 6:45 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 package org.adblockplus.libadblockplus.android.webview; 18 package org.adblockplus.libadblockplus.android.webview;
19 19
20 import android.annotation.TargetApi; 20 import android.annotation.TargetApi;
21 import android.content.Context; 21 import android.content.Context;
22 import android.graphics.Bitmap; 22 import android.graphics.Bitmap;
23 import android.graphics.Canvas; 23 import android.graphics.Canvas;
24 import android.graphics.Color; 24 import android.graphics.Color;
25 import android.net.Uri;
25 import android.net.http.SslError; 26 import android.net.http.SslError;
26 import android.os.Build; 27 import android.os.Build;
27 import android.os.Handler; 28 import android.os.Handler;
28 import android.os.Message; 29 import android.os.Message;
29 import android.util.AttributeSet; 30 import android.util.AttributeSet;
30 import android.util.Log; 31 import android.util.Log;
31 import android.view.KeyEvent; 32 import android.view.KeyEvent;
32 import android.view.View; 33 import android.view.View;
33 import android.webkit.ConsoleMessage; 34 import android.webkit.ConsoleMessage;
34 import android.webkit.GeolocationPermissions; 35 import android.webkit.GeolocationPermissions;
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 { 569 {
569 w("Workaround for the issue #5303"); 570 w("Workaround for the issue #5303");
570 stopPreventDrawing(); 571 stopPreventDrawing();
571 } 572 }
572 573
573 if (extWebChromeClient != null) 574 if (extWebChromeClient != null)
574 { 575 {
575 extWebChromeClient.onProgressChanged(view, newProgress); 576 extWebChromeClient.onProgressChanged(view, newProgress);
576 } 577 }
577 } 578 }
579
580 @Override
581 public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> fileP athCallback,
582 FileChooserParams fileChooserParams)
583 {
584 if (extWebChromeClient != null)
585 {
586 return extWebChromeClient.onShowFileChooser(webView, filePathCallback, f ileChooserParams);
587 }
588 else
589 {
590 return super.onShowFileChooser(webView, filePathCallback, fileChooserPar ams);
591 }
592 }
578 }; 593 };
579 594
580 public int getAllowDrawDelay() 595 public int getAllowDrawDelay()
581 { 596 {
582 return allowDrawDelay; 597 return allowDrawDelay;
583 } 598 }
584 599
585 /** 600 /**
586 * Set start redraw delay after DOM modified with injected JS 601 * Set start redraw delay after DOM modified with injected JS
587 * (used to prevent flickering after 'DOM ready') 602 * (used to prevent flickering after 'DOM ready')
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 w("Busy with elemhide selectors, delayed disposing scheduled"); 1453 w("Busy with elemhide selectors, delayed disposing scheduled");
1439 elemHideThread.setFinishedRunnable(disposeRunnable); 1454 elemHideThread.setFinishedRunnable(disposeRunnable);
1440 } 1455 }
1441 else 1456 else
1442 { 1457 {
1443 disposeRunnable.run(); 1458 disposeRunnable.run();
1444 } 1459 }
1445 } 1460 }
1446 } 1461 }
1447 } 1462 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld