| Index: android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| index ff33c778a41001192b5aaa9c66067f102079413a..846722b4d17c0c7c0b1ae59df39843986438b091 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| @@ -4,15 +4,10 @@
|
|
|
| package org.chromium.android_webview;
|
|
|
| -import android.content.Context;
|
| -import android.content.Intent;
|
| import android.view.KeyEvent;
|
|
|
| -import org.chromium.base.Log;
|
| import org.chromium.content.browser.ContentViewClient;
|
|
|
| -import java.net.URISyntaxException;
|
| -
|
| /**
|
| * ContentViewClient implementation for WebView
|
| */
|
| @@ -22,40 +17,12 @@ public class AwContentViewClient extends ContentViewClient {
|
| private final AwContentsClient mAwContentsClient;
|
| private final AwSettings mAwSettings;
|
| private final AwContents mAwContents;
|
| - private final Context mContext;
|
|
|
| - public AwContentViewClient(AwContentsClient awContentsClient, AwSettings awSettings,
|
| - AwContents awContents, Context context) {
|
| + public AwContentViewClient(
|
| + AwContentsClient awContentsClient, AwSettings awSettings, AwContents awContents) {
|
| mAwContentsClient = awContentsClient;
|
| mAwSettings = awSettings;
|
| mAwContents = awContents;
|
| - mContext = context;
|
| - }
|
| -
|
| - @Override
|
| - public void onBackgroundColorChanged(int color) {
|
| - mAwContentsClient.onBackgroundColorChanged(color);
|
| - }
|
| -
|
| - @Override
|
| - public void onStartContentIntent(Context context, String contentUrl, boolean isMainFrame) {
|
| - // Make sure that this URL is a valid scheme for this callback if interpreted as an intent,
|
| - // even though we don't dispatch it as an intent here, because many WebView apps will once
|
| - // it reaches them.
|
| - String scheme = null;
|
| - try {
|
| - Intent intent = Intent.parseUri(contentUrl, Intent.URI_INTENT_SCHEME);
|
| - scheme = intent.getScheme();
|
| - } catch (URISyntaxException e) {
|
| - // Just don't set the scheme, it will be rejected.
|
| - }
|
| - if (!isAcceptableContentIntentScheme(scheme)) {
|
| - Log.w(TAG, "Invalid scheme for URI %s", contentUrl);
|
| - return;
|
| - }
|
| - // Comes from WebViewImpl::detectContentOnTouch in Blink, so must be user-initiated, and
|
| - // isn't a redirect.
|
| - mAwContentsClient.shouldIgnoreNavigation(context, contentUrl, isMainFrame, true, false);
|
| }
|
|
|
| @Override
|
| @@ -63,7 +30,7 @@ public class AwContentViewClient extends ContentViewClient {
|
| if (mAwContentsClient.hasWebViewClient()) {
|
| // The check below is reflecting Chrome's behavior and is a workaround for
|
| // http://b/7697782.
|
| - if (!ContentViewClient.shouldPropagateKey(event.getKeyCode())) return true;
|
| + if (!shouldPropagateKey(event.getKeyCode())) return true;
|
| return mAwContentsClient.shouldOverrideKeyEvent(event);
|
| }
|
|
|
|
|