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

Unified Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java

Issue 212663004: Fix a problem that video does not show up in Chrome Shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/TabManager.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
index 54c920ae5f92f9ba34c81096189b0bc616f70775..8b617261b41be10eaa461a439ae9a7ba90203e81 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
@@ -12,6 +12,7 @@ import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.View;
import android.widget.Toast;
import com.google.common.annotations.VisibleForTesting;
@@ -33,6 +34,7 @@ import org.chromium.content.browser.ActivityContentVideoViewClient;
import org.chromium.content.browser.BrowserStartupController;
import org.chromium.content.browser.ContentView;
import org.chromium.content.browser.DeviceUtils;
+import org.chromium.content.common.ContentSwitches;
import org.chromium.printing.PrintManagerDelegateImpl;
import org.chromium.printing.PrintingController;
import org.chromium.sync.signin.ChromeSigninController;
@@ -130,7 +132,25 @@ public class ChromeShellActivity extends Activity implements AppMenuPropertiesDe
mWindow = sWindowAndroidFactory.getActivityWindowAndroid(this);
mWindow.restoreInstanceState(savedInstanceState);
- mTabManager.initialize(mWindow, new ActivityContentVideoViewClient(this));
+ mTabManager.initialize(mWindow, new ActivityContentVideoViewClient(this) {
+ @Override
+ public void onShowCustomView(View view) {
+ super.onShowCustomView(view);
+ if (!CommandLine.getInstance().hasSwitch(
+ ContentSwitches.DISABLE_OVERLAY_FULLSCREEN_VIDEO_SUBTITLE)) {
+ mTabManager.setOverlayVideoMode(true);
+ }
+ }
+
+ @Override
+ public void onDestroyContentVideoView() {
+ super.onDestroyContentVideoView();
+ if (!CommandLine.getInstance().hasSwitch(
+ ContentSwitches.DISABLE_OVERLAY_FULLSCREEN_VIDEO_SUBTITLE)) {
+ mTabManager.setOverlayVideoMode(false);
+ }
+ }
+ });
String startupUrl = getUrlFromIntent(getIntent());
if (!TextUtils.isEmpty(startupUrl)) {
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/TabManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698