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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 2353063005: Refactor ContentViewClient (1/6) (Closed)
Patch Set: fix tests Created 4 years, 3 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: 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 97c07e0c68681663719b9df7625768ddadeb48be..2e9ea985481b32b077bc7f0e089e47127989c122 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
@@ -312,6 +312,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
}
private final Context mContext;
+ private final String mProductVersion;
private ViewGroup mContainerView;
private InternalAccessDelegate mContainerViewInternals;
private WebContents mWebContents;
@@ -477,8 +478,9 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
*
* @param context The context used to create this.
*/
- public ContentViewCore(Context context) {
+ public ContentViewCore(Context context, String productVersion) {
mContext = context;
+ mProductVersion = productVersion;
mRenderCoordinates = new RenderCoordinates();
mJoystickScrollProvider = new JoystickScrollProvider(this);
mAccessibilityManager = (AccessibilityManager)
@@ -490,6 +492,10 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
mWindowAndroidChangedObservers = new ObserverList<WindowAndroidChangedObserver>();
}
+ public ContentViewCore(Context context) {
boliu 2016/09/26 21:25:25 remove this and fix all callers?
Jinsuk Kim 2016/09/27 10:08:59 Done.
+ this(context, "");
+ }
+
/**
* @return The context used for creating this ContentViewCore.
*/
@@ -2947,7 +2953,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
@Override
public void onAccessibilitySnapshot(AccessibilitySnapshotNode root) {
viewRoot.setClassName("");
- viewRoot.setHint(mContentViewClient.getProductVersion());
+ viewRoot.setHint(mProductVersion);
if (root == null) {
viewRoot.asyncCommit();
return;
@@ -3217,15 +3223,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
if (potentiallyActiveFlingCount > 0) updateGestureStateListener(GestureEventType.FLING_END);
}
- ContentVideoViewEmbedder getContentVideoViewEmbedder() {
- return getContentViewClient().getContentVideoViewEmbedder();
- }
-
- @CalledByNative
- private boolean shouldBlockMediaRequest(String url) {
- return getContentViewClient().shouldBlockMediaRequest(url);
- }
-
@CalledByNative
private void onNativeFlingStopped() {
// Note that mTouchScrollInProgress should normally be false at this

Powered by Google App Engine
This is Rietveld 408576698