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

Unified Diff: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java

Issue 2353063005: Refactor ContentViewClient (1/6) (Closed)
Patch Set: rebased 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: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
index 6c576f55ee091d1a7d0a1aee00be44d679eb954e..879a58fad4435f1a9c2c7507a0e899d8d981bf14 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
@@ -21,7 +21,6 @@ import android.widget.Toast;
import org.chromium.base.Log;
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.ui.base.WindowAndroid;
@@ -115,12 +114,12 @@ public class CastShellActivity extends Activity {
Log.d(TAG, "onCreate startupUrl: %s", url);
mNativeCastWindow = mCastWindowManager.launchCastWindow(url);
- getActiveContentViewCore().setContentViewClient(new ContentViewClient() {
- @Override
- public ContentVideoViewEmbedder getContentVideoViewEmbedder() {
- return new ActivityContentVideoViewEmbedder(CastShellActivity.this);
- }
- });
+ getActiveContentViewCore().setContentViewClient(new ContentViewClient());
+ CastWindowAndroid shellView = getActiveCastWindow();
+ if (shellView != null) {
+ shellView.setContentVideoViewEmbedder(
Simeon 2016/09/28 00:24:52 I think a better way to do this is to pass the Con
Jinsuk Kim 2016/09/28 03:58:52 While appreciating your suggestion, I tried a simp
+ new ActivityContentVideoViewEmbedder(CastShellActivity.this));
Simeon 2016/09/28 00:24:52 Now that this line isn't in an anonymous class, we
Jinsuk Kim 2016/09/28 03:58:52 Removed.
+ }
}
@Override

Powered by Google App Engine
This is Rietveld 408576698