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

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

Issue 9875028: Reverting due to memory (Valgrind) errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « chrome/browser/ui/fullscreen_controller.h ('k') | chrome/browser/ui/tests/browser_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/fullscreen_controller.cc
===================================================================
--- chrome/browser/ui/fullscreen_controller.cc (revision 129471)
+++ chrome/browser/ui/fullscreen_controller.cc (working copy)
@@ -39,12 +39,16 @@
FullscreenController::~FullscreenController() {}
-bool FullscreenController::IsFullscreenForBrowser() const {
- return window_->IsFullscreen() && !tab_caused_fullscreen_;
+bool FullscreenController::IsFullscreenForTab() const {
+ return fullscreened_tab_ != NULL;
}
-bool FullscreenController::IsFullscreenForTabOrPending() const {
- return fullscreened_tab_ != NULL;
+bool FullscreenController::IsFullscreenForTab(const WebContents* tab) const {
+ if (IsFullscreenForTabOrPending(tab)) {
+ DCHECK(window_->IsFullscreen());
+ return true;
+ }
+ return false;
}
bool FullscreenController::IsFullscreenForTabOrPending(
@@ -57,10 +61,6 @@
return true;
}
-bool FullscreenController::IsMouseLockedOrPending() const {
- return mouse_lock_state_ != MOUSELOCK_NOT_REQUESTED;
-}
-
void FullscreenController::RequestToLockMouse(WebContents* tab) {
// Mouse Lock is only permitted when browser is in tab fullscreen.
if (!IsFullscreenForTabOrPending(tab)) {
@@ -171,7 +171,7 @@
}
void FullscreenController::OnTabClosing(WebContents* web_contents) {
- if (IsFullscreenForTabOrPending(web_contents)) {
+ if (IsFullscreenForTab(web_contents)) {
ExitTabbedFullscreenModeIfNecessary();
// The call to exit fullscreen may result in asynchronous notification of
// fullscreen state change (e.g., on Linux). We don't want to rely on it
@@ -265,7 +265,7 @@
}
bool FullscreenController::HandleUserPressedEscape() {
- if (!IsFullscreenForTabOrPending())
+ if (!IsFullscreenForTab())
return false;
ExitTabbedFullscreenModeIfNecessary();
return true;
Property changes on: chrome/browser/ui/fullscreen_controller.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « chrome/browser/ui/fullscreen_controller.h ('k') | chrome/browser/ui/tests/browser_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698