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

Unified Diff: chrome/browser/ui/fullscreen_controller.cc

Issue 8865004: Create CoreTabHelper, move remaining core TCW functionality into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lots of helpers now Created 9 years 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: chrome/browser/ui/fullscreen_controller.cc
diff --git a/chrome/browser/ui/fullscreen_controller.cc b/chrome/browser/ui/fullscreen_controller.cc
index 4a90b84ca679ee33d7dcc764fafcea23107f114b..c8f497e59b2bb8d24b3e3c6880a69bd65321b190 100644
--- a/chrome/browser/ui/fullscreen_controller.cc
+++ b/chrome/browser/ui/fullscreen_controller.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
+#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_service.h"
@@ -276,10 +277,12 @@ bool FullscreenController::HandleUserPressedEscape() {
}
void FullscreenController::NotifyTabOfFullscreenExitIfNecessary() {
- if (fullscreened_tab_)
- fullscreened_tab_->ExitFullscreenMode();
- else
+ if (fullscreened_tab_ &&
+ fullscreened_tab_->tab_contents()->render_view_host()) {
+ fullscreened_tab_->tab_contents()->render_view_host()->ExitFullscreen();
+ } else {
DCHECK_EQ(mouse_lock_state_, MOUSELOCK_NOT_REQUESTED);
+ }
fullscreened_tab_ = NULL;
tab_caused_fullscreen_ = false;

Powered by Google App Engine
This is Rietveld 408576698