Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| index b4799019a9d80ae452471369228ca03249b6d8e1..8f3f5119ff053eacd48264a340fd45b610b11916 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| @@ -1899,8 +1899,8 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| intent.putExtra(Intent.EXTRA_PROCESS_TEXT, query); |
| try { |
| - if (getContentViewClient().doesPerformProcessText()) { |
| - getContentViewClient().startProcessTextIntent(intent); |
| + if (getWindowAndroid().doesPerformProcessText()) { |
|
boliu
2016/09/30 22:34:16
getWindowAndroid does jni, so probably better to s
|
| + getWindowAndroid().startProcessTextIntent(intent); |
| } else { |
| getWindowAndroid().showIntent( |
| intent, new WindowAndroid.IntentCallback() { |
| @@ -1924,8 +1924,8 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| if (TextUtils.isEmpty(query)) return; |
| // See if ContentViewClient wants to override. |
| - if (getContentViewClient().doesPerformWebSearch()) { |
| - getContentViewClient().performWebSearch(query); |
| + if (getWindowAndroid().doesPerformWebSearch()) { |
| + getWindowAndroid().performWebSearch(query); |
| return; |
| } |
| @@ -1964,7 +1964,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| clearSelection(); |
| } |
| if (!supportsFloatingActionMode()) { |
| - getContentViewClient().onContextualActionBarHidden(); |
| + getWindowAndroid().onContextualActionBarHidden(); |
|
boliu
2016/09/30 22:34:16
getWindowAndroid can return null, but only during
|
| } |
| } |
| @@ -1989,7 +1989,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| @Override |
| public boolean isSelectActionModeAllowed(int actionModeItem) { |
| boolean isAllowedByClient = |
| - getContentViewClient().isSelectActionModeAllowed(actionModeItem); |
| + getWindowAndroid().isSelectActionModeAllowed(actionModeItem); |
| if (actionModeItem == WebActionModeCallback.MENU_ITEM_SHARE) { |
| return isAllowedByClient && isShareAvailable(); |
| } |
| @@ -2009,7 +2009,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| } |
| private boolean isWebSearchAvailable() { |
| - if (getContentViewClient().doesPerformWebSearch()) return true; |
| + if (getWindowAndroid().doesPerformWebSearch()) return true; |
| Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); |
| intent.putExtra(SearchManager.EXTRA_NEW_SEARCH, true); |
| return getContext().getPackageManager().queryIntentActivities(intent, |
| @@ -2038,7 +2038,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| // TODO(jdduke): Refactor ContentViewClient.onContextualActionBarShown to be aware of |
| // non-action-bar (i.e., floating) ActionMode instances, crbug.com/524666. |
| if (!supportsFloatingActionMode()) { |
| - getContentViewClient().onContextualActionBarShown(); |
| + getWindowAndroid().onContextualActionBarShown(); |
| } |
| } |
| } |
| @@ -2821,11 +2821,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| return mRenderCoordinates.getPageScaleFactor(); |
| } |
| - @CalledByNative |
| - private void startContentIntent(String contentUrl, boolean isMainFrame) { |
| - getContentViewClient().onStartContentIntent(getContext(), contentUrl, isMainFrame); |
| - } |
| - |
| @Override |
| public void onAccessibilityStateChanged(boolean enabled) { |
| setAccessibilityState(enabled); |