diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-27 23:15:52 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-27 23:15:52 +0000 |
commit | fc33068b1e08aad7d3b19691a5089d6aa7359fab (patch) | |
tree | 94e009730f4203e7b55d193a98b4e8f31646c4d6 /chrome/browser/ui/panels/display_settings_provider.cc | |
parent | 282501f5a03ec42ceb15e6e56d4580393bdf2095 (diff) | |
download | chromium_src-fc33068b1e08aad7d3b19691a5089d6aa7359fab.zip chromium_src-fc33068b1e08aad7d3b19691a5089d6aa7359fab.tar.gz chromium_src-fc33068b1e08aad7d3b19691a5089d6aa7359fab.tar.bz2 |
Fix the problem that docked panel flickers when Chrome just enters fullscreen mode
The fix is to skip isActiveSpace check in IsFullScreen when chrome just enters fullscreen. This is because the Chrome window has not been put on active space when it just enters fullscreen mode.
BUG=223867
TEST=Manual test by opening a docked panel and making a chrome window enter fullscreen mode
Review URL: https://codereview.chromium.org/13095012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191060 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 | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/chrome/browser/ui/panels/display_settings_provider.cc b/chrome/browser/ui/panels/display_settings_provider.cc index 2312d44..adf5ff2 100644 --- a/chrome/browser/ui/panels/display_settings_provider.cc +++ b/chrome/browser/ui/panels/display_settings_provider.cc @@ -4,6 +4,7 @@ #include "chrome/browser/ui/panels/display_settings_provider.h" +#include "base/bind.h" #include "base/logging.h" #include "chrome/browser/fullscreen.h" #include "ui/gfx/screen.h" @@ -47,7 +48,9 @@ void DisplaySettingsProvider::AddFullScreenObserver( if (full_screen_observers_.size() == 1 && NeedsPeriodicFullScreenCheck()) { full_screen_mode_timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFullScreenModeCheckIntervalMs), - this, &DisplaySettingsProvider::CheckFullScreenMode); + base::Bind(&DisplaySettingsProvider::CheckFullScreenMode, + base::Unretained(this), + PERFORM_FULLSCREEN_CHECK)); } } @@ -127,8 +130,23 @@ bool DisplaySettingsProvider::NeedsPeriodicFullScreenCheck() const { return true; } -void DisplaySettingsProvider::CheckFullScreenMode() { - bool is_full_screen = IsFullScreen(); +void DisplaySettingsProvider::CheckFullScreenMode( + FullScreenCheckMode check_mode) { + bool is_full_screen = false; + switch (check_mode) { + case ASSUME_FULLSCREEN_ON: + is_full_screen = true; + break; + case ASSUME_FULLSCREEN_OFF: + is_full_screen = false; + break; + case PERFORM_FULLSCREEN_CHECK: + is_full_screen = IsFullScreen(); + break; + default: + NOTREACHED(); + break; + } if (is_full_screen == is_full_screen_) return; is_full_screen_ = is_full_screen; |