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

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

Issue 833363002: Exit fullscreen video for ChromeShell and ContentShell on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « AUTHORS ('k') | content/shell/android/java/src/org/chromium/content_shell/Shell.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/ChromeShellTab.java
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java
index 067cf380f30a6692afff44b197728801f2b09607..3be5351e127c23efcc63ba3a6aab1d00dd58df2f 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java
@@ -12,6 +12,7 @@ import org.chromium.chrome.browser.UrlUtilities;
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulator;
import org.chromium.chrome.browser.contextmenu.ContextMenuPopulator;
import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
+import org.chromium.content.browser.ContentVideoView;
import org.chromium.content.browser.ContentViewClient;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.NavigationController;
@@ -125,6 +126,12 @@ public class ChromeShellTab extends Tab {
public void toggleFullscreenModeForTab(boolean enterFullscreen) {
mIsFullscreen = enterFullscreen;
super.toggleFullscreenModeForTab(enterFullscreen);
+
+ if (!mIsFullscreen) {
+ ContentVideoView videoView = ContentVideoView.getContentVideoView();
+ if (videoView != null) videoView.exitFullscreen(false);
+ }
+
}
@Override
« no previous file with comments | « AUTHORS ('k') | content/shell/android/java/src/org/chromium/content_shell/Shell.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698