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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 928673002: Exit HTML Fullscreen when browser fullscreen is active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 1472
1473 #if defined(OS_ANDROID) 1473 #if defined(OS_ANDROID)
1474 ContentVideoView* video_view = ContentVideoView::GetInstance(); 1474 ContentVideoView* video_view = ContentVideoView::GetInstance();
1475 if (video_view != NULL) 1475 if (video_view != NULL)
1476 video_view->OnExitFullscreen(); 1476 video_view->OnExitFullscreen();
1477 #endif 1477 #endif
1478 1478
1479 if (delegate_) 1479 if (delegate_)
1480 delegate_->ExitFullscreenModeForTab(this); 1480 delegate_->ExitFullscreenModeForTab(this);
1481 1481
1482 // Ensure web contents exit fullscreen state by sending a resize message,
1483 // which includes the fullscreen state. This is required for the situation
1484 // of the browser moving the view into a fullscreen state "browser fullscreen"
1485 // and then the contents entering "tab fullscreen". Exiting the contents
1486 // "tab fullscreen" then won't have the side effect of the view resizing,
1487 // hence the explicit call here is required.
1488 if (RenderWidgetHostView* rwh_view = GetRenderWidgetHostView()) {
1489 if (RenderWidgetHost* render_widget_host = rwh_view->GetRenderWidgetHost())
1490 render_widget_host->WasResized();
1491 }
1492
1482 FOR_EACH_OBSERVER(WebContentsObserver, 1493 FOR_EACH_OBSERVER(WebContentsObserver,
1483 observers_, 1494 observers_,
1484 DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab())); 1495 DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab()));
1485 } 1496 }
1486 1497
1487 bool WebContentsImpl::IsFullscreenForCurrentTab() const { 1498 bool WebContentsImpl::IsFullscreenForCurrentTab() const {
1488 return delegate_ ? delegate_->IsFullscreenForTabOrPending(this) : false; 1499 return delegate_ ? delegate_->IsFullscreenForTabOrPending(this) : false;
1489 } 1500 }
1490 1501
1491 void WebContentsImpl::RequestToLockMouse(bool user_gesture, 1502 void WebContentsImpl::RequestToLockMouse(bool user_gesture,
(...skipping 3019 matching lines...) Expand 10 before | Expand all | Expand 10 after
4511 node->render_manager()->ResumeResponseDeferredAtStart(); 4522 node->render_manager()->ResumeResponseDeferredAtStart();
4512 } 4523 }
4513 4524
4514 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4525 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4515 force_disable_overscroll_content_ = force_disable; 4526 force_disable_overscroll_content_ = force_disable;
4516 if (view_) 4527 if (view_)
4517 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4528 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4518 } 4529 }
4519 4530
4520 } // namespace content 4531 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698