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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 652673002: NOT FOR REVIEW: Modify ToggleFullscreenMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fixPowerBlockerNonMedia
Patch Set: Rebase Created 6 years, 2 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/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index dee333635a7246c22b55117c67174828606f013c..e98e61d8e7ea25d3e0614049a4a55881b2912ca1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1325,8 +1325,12 @@ void WebContentsImpl::RenderWidgetDeleted(
if (render_widget_host &&
render_widget_host->GetRoutingID() == fullscreen_widget_routing_id_) {
- if (delegate_ && delegate_->EmbedsFullscreenWidget())
- delegate_->ToggleFullscreenModeForTab(this, false);
+ if (delegate_ && delegate_->EmbedsFullscreenWidget()) {
+
+ bool is_video = true; // TODO(igsolla): find how tho retrieve this value!!!
+
+ delegate_->ToggleFullscreenModeForTab(this, false, is_video);
+ }
FOR_EACH_OBSERVER(WebContentsObserver,
observers_,
DidDestroyFullscreenWidget(
@@ -1445,7 +1449,7 @@ void WebContentsImpl::HandleGestureEnd() {
delegate_->HandleGestureEnd();
}
-void WebContentsImpl::ToggleFullscreenMode(bool enter_fullscreen) {
+void WebContentsImpl::ToggleFullscreenMode(bool enter_fullscreen, bool is_video) {
// This method is being called to enter or leave renderer-initiated fullscreen
// mode. Either way, make sure any existing fullscreen widget is shut down
// first.
@@ -1454,7 +1458,7 @@ void WebContentsImpl::ToggleFullscreenMode(bool enter_fullscreen) {
RenderWidgetHostImpl::From(widget_view->GetRenderWidgetHost())->Shutdown();
if (delegate_)
- delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen);
+ delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen, is_video);
FOR_EACH_OBSERVER(WebContentsObserver,
observers_,
@@ -1717,7 +1721,10 @@ void WebContentsImpl::ShowCreatedWidget(int route_id,
fullscreen_widget_routing_id_ = route_id;
if (delegate_ && delegate_->EmbedsFullscreenWidget()) {
widget_host_view->InitAsChild(GetRenderWidgetHostView()->GetNativeView());
- delegate_->ToggleFullscreenModeForTab(this, true);
+
+ bool is_video = true; // TODO(igsola): find out how to retrieve this value!!!!
+
+ delegate_->ToggleFullscreenModeForTab(this, true, is_video);
} else {
widget_host_view->InitAsFullscreen(view);
}
@@ -3598,8 +3605,12 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh,
// Ensure fullscreen mode is exited in the |delegate_| since a crashed
// renderer may not have made a clean exit.
- if (IsFullscreenForCurrentTab())
- ToggleFullscreenMode(false);
+ if (IsFullscreenForCurrentTab()) {
+
+ bool is_video = true; // TODO(igsolla): find out how to retrieve this value!!!
+
+ ToggleFullscreenMode(false, is_video);
+ }
// Cancel any visible dialogs so they are not left dangling over the sad tab.
if (dialog_manager_)
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698