Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1288)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java

Issue 572013002: Removing ContentViewCore dependencies from direct WebContents functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
index 1746eb0fd520549faf3118a9b0bd330924caf1be..eecfd51f747805bbe3ba1625e7a1e4dbcb65b64b 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
@@ -20,7 +20,7 @@ import android.webkit.ValueCallback;
import org.chromium.base.ContentUriUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.content.browser.ContentVideoView;
-import org.chromium.content.browser.ContentViewCore;
+import org.chromium.content_public.browser.WebContents;
/**
* Adapts the AwWebContentsDelegate interface to the AwContentsClient interface.
@@ -135,7 +135,7 @@ class AwWebContentsDelegateAdapter extends AwWebContentsDelegate {
}
@Override
- public void showRepostFormWarningDialog(final ContentViewCore contentViewCore) {
+ public void showRepostFormWarningDialog(final WebContents webContents) {
// TODO(mkosiba) We should be using something akin to the JsResultReceiver as the
// callback parameter (instead of ContentViewCore) and implement a way of converting
// that to a pair of messages.
@@ -147,17 +147,15 @@ class AwWebContentsDelegateAdapter extends AwWebContentsDelegate {
final Handler handler = new Handler(ThreadUtils.getUiThreadLooper()) {
@Override
public void handleMessage(Message msg) {
- if (contentViewCore.getWebContents() == null) return;
+ if (webContents == null) return;
boliu 2014/10/09 17:10:04 This isn't the same check anymore. This was meant
AKVT 2014/10/11 10:51:59 Done.
switch(msg.what) {
case msgContinuePendingReload: {
- contentViewCore.getWebContents().getNavigationController()
- .continuePendingReload();
+ webContents.getNavigationController().continuePendingReload();
break;
}
case msgCancelPendingReload: {
- contentViewCore.getWebContents().getNavigationController()
- .cancelPendingReload();
+ webContents.getNavigationController().cancelPendingReload();
break;
}
default:

Powered by Google App Engine
This is Rietveld 408576698