diff options
| author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 23:42:39 +0000 |
|---|---|---|
| committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 23:42:39 +0000 |
| commit | 42adbb2be521b1f777695285da9caeb33539c08d (patch) | |
| tree | 178c8c673470c6f1ee08fd94b6ad83677051c8d1 /chrome/browser/ui/fullscreen_controller.cc | |
| parent | d2b67a475c1f0c4b649e48b58d0fb1dd6c284e14 (diff) | |
| download | chromium_src-42adbb2be521b1f777695285da9caeb33539c08d.zip chromium_src-42adbb2be521b1f777695285da9caeb33539c08d.tar.gz chromium_src-42adbb2be521b1f777695285da9caeb33539c08d.tar.bz2 | |
Merge 143941 - Exit mouse lock permision prompt on tab switch or close.
Merge approved in roll-up issue crbug.com/134196#c9.
BUG=131702
Review URL: https://chromiumcodereview.appspot.com/10642008
TBR=scheib@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@145793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/fullscreen_controller.cc')
| -rw-r--r-- | chrome/browser/ui/fullscreen_controller.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/ui/fullscreen_controller.cc b/chrome/browser/ui/fullscreen_controller.cc index 7702c65..9136131 100644 --- a/chrome/browser/ui/fullscreen_controller.cc +++ b/chrome/browser/ui/fullscreen_controller.cc @@ -246,7 +246,9 @@ void FullscreenController::LostMouseLock() { } void FullscreenController::OnTabClosing(WebContents* web_contents) { - if (IsFullscreenForTabOrPending(web_contents)) { + const TabContents* contents = TabContents::FromWebContents(web_contents); + if (contents && + (contents == fullscreened_tab_ || contents == mouse_lock_tab_)) { ExitTabFullscreenOrMouseLockIfNecessary(); // 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 @@ -258,7 +260,8 @@ void FullscreenController::OnTabClosing(WebContents* web_contents) { } void FullscreenController::OnTabDeactivated(TabContents* contents) { - if (contents == fullscreened_tab_) + if (contents && + (contents == fullscreened_tab_ || contents == mouse_lock_tab_)) ExitTabFullscreenOrMouseLockIfNecessary(); } |
