diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-24 11:01:16 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-24 11:01:16 +0000 |
commit | bfeaa8f446e907448865024b3b175fa0831e6c35 (patch) | |
tree | 93601ce32b58011269e5a837ca5ad7975dbf06e4 /chrome/browser/ui/panels/display_settings_provider.cc | |
parent | d74359fa091d79baf4d4e4f7ad5d235a8d08043c (diff) | |
download | chromium_src-bfeaa8f446e907448865024b3b175fa0831e6c35.zip chromium_src-bfeaa8f446e907448865024b3b175fa0831e6c35.tar.gz chromium_src-bfeaa8f446e907448865024b3b175fa0831e6c35.tar.bz2 |
Fix bug 112240: Panels [OSX]: Panels don't hide when Chrome goes into full screen or presentation mode on Lion
BUG=112240
TEST=Manual test by launching panels and making chrome tab window fullscreen
Review URL: https://chromiumcodereview.appspot.com/10409099
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/panels/display_settings_provider.cc')
-rw-r--r-- | chrome/browser/ui/panels/display_settings_provider.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/ui/panels/display_settings_provider.cc b/chrome/browser/ui/panels/display_settings_provider.cc index 08d5f1b..13ed0ad 100644 --- a/chrome/browser/ui/panels/display_settings_provider.cc +++ b/chrome/browser/ui/panels/display_settings_provider.cc @@ -45,7 +45,7 @@ void DisplaySettingsProvider::AddFullScreenObserver( FullScreenObserver* observer) { full_screen_observers_.AddObserver(observer); - if (full_screen_observers_.size() == 1) { + if (full_screen_observers_.size() == 1 && NeedsPeriodicFullScreenCheck()) { full_screen_mode_timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFullScreenModeCheckIntervalMs), this, &DisplaySettingsProvider::CheckFullScreenMode); @@ -149,8 +149,12 @@ void DisplaySettingsProvider::AdjustWorkAreaForAutoHidingDesktopBars() { } } +bool DisplaySettingsProvider::NeedsPeriodicFullScreenCheck() const { + return true; +} + void DisplaySettingsProvider::CheckFullScreenMode() { - bool is_full_screen = IsFullScreenMode(); + bool is_full_screen = IsFullScreen(); if (is_full_screen == is_full_screen_) return; is_full_screen_ = is_full_screen; @@ -160,6 +164,10 @@ void DisplaySettingsProvider::CheckFullScreenMode() { OnFullScreenModeChanged(is_full_screen_)); } +bool DisplaySettingsProvider::IsFullScreen() const { + return IsFullScreenMode(); +} + #if defined(USE_AURA) // static DisplaySettingsProvider* DisplaySettingsProvider::Create() { |