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

Unified Diff: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java

Issue 13669003: Refactoring ContentVideoViewContextDelegate.java (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: using weak reference in native side Created 7 years, 8 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/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
index f72d1fb3fd154e678d2762a230f104568e029331..897d63cb5cb2fed2412c42c93ee3d6b2720e56ac 100644
--- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
+++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
@@ -16,10 +16,12 @@ import android.view.KeyEvent;
import org.chromium.base.ChromiumActivity;
import org.chromium.content.app.LibraryLoader;
-import org.chromium.content.browser.ActivityContentVideoViewDelegate;
+import org.chromium.content.browser.ActivityContentVideoViewClient;
import org.chromium.content.browser.AndroidBrowserProcess;
import org.chromium.content.browser.ContentVideoView;
+import org.chromium.content.browser.ContentVideoViewClient;
import org.chromium.content.browser.ContentView;
+import org.chromium.content.browser.ContentViewClient;
import org.chromium.content.browser.DeviceUtils;
import org.chromium.content.browser.TracingIntentHandler;
import org.chromium.content.common.CommandLine;
@@ -70,8 +72,6 @@ public class ContentShellActivity extends ChromiumActivity {
mActivityNativeWindow = new ActivityNativeWindow(this);
mActivityNativeWindow.restoreInstanceState(savedInstanceState);
mShellManager.setWindow(mActivityNativeWindow);
- ContentVideoView.registerContentVideoViewContextDelegate(
- new ActivityContentVideoViewDelegate(this));
String startupUrl = getUrlFromIntent(getIntent());
if (!TextUtils.isEmpty(startupUrl)) {
@@ -85,6 +85,12 @@ public class ContentShellActivity extends ChromiumActivity {
}
mShellManager.launchShell(shellUrl);
}
+ getActiveContentView().setContentViewClient(new ContentViewClient() {
+ @Override
+ public ContentVideoViewClient getContentVideoViewClient() {
+ return new ActivityContentVideoViewClient(ContentShellActivity.this);
+ }
+ });
} catch (ProcessInitException e) {
Log.e(TAG, "ContentView initialization failed.", e);
finish();

Powered by Google App Engine
This is Rietveld 408576698