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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java

Issue 2353063005: Refactor ContentViewClient (1/6) (Closed)
Patch Set: cast to activity 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
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/Shell.java ('k') | content/shell/browser/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
index d41997f212a0a097a5ab14983c67bd15bb49972e..cfddd40862ba0ca82eaaeb47354c160212c5b38a 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
@@ -4,18 +4,14 @@
package org.chromium.content_shell;
-import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
-import android.view.View;
import android.widget.FrameLayout;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
-import org.chromium.content.browser.ActivityContentVideoViewEmbedder;
-import org.chromium.content.browser.ContentVideoViewEmbedder;
import org.chromium.content.browser.ContentViewClient;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.ContentViewRenderView;
@@ -35,7 +31,7 @@ public class ShellManager extends FrameLayout {
// The target for all content rendering.
private ContentViewRenderView mContentViewRenderView;
- private ContentViewClient mContentViewClient;
+ private final ContentViewClient mContentViewClient = new ContentViewClient();
/**
* Constructor for inflating via XML.
@@ -43,24 +39,6 @@ public class ShellManager extends FrameLayout {
public ShellManager(final Context context, AttributeSet attrs) {
super(context, attrs);
nativeInit(this);
- mContentViewClient = new ContentViewClient() {
- @Override
- public ContentVideoViewEmbedder getContentVideoViewEmbedder() {
- return new ActivityContentVideoViewEmbedder((Activity) context) {
- @Override
- public void enterFullscreenVideo(View view, boolean isVideoLoaded) {
- super.enterFullscreenVideo(view, isVideoLoaded);
- setOverlayVideoMode(true);
- }
-
- @Override
- public void exitFullscreenVideo() {
- super.exitFullscreenVideo();
- setOverlayVideoMode(false);
- }
- };
- }
- };
}
/**
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/Shell.java ('k') | content/shell/browser/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698