diff options
author | rharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 16:53:55 +0000 |
---|---|---|
committer | rharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 16:53:55 +0000 |
commit | 107408c01f17a6a0580a05f0abfb6ce3af5ea063 (patch) | |
tree | 2e2c5d8b14ee37c93c17984aee32755623080446 /ash/test | |
parent | 3d17fedadc6a40eca2fc0a403a2f6da0962128da (diff) | |
download | chromium_src-107408c01f17a6a0580a05f0abfb6ce3af5ea063.zip chromium_src-107408c01f17a6a0580a05f0abfb6ce3af5ea063.tar.gz chromium_src-107408c01f17a6a0580a05f0abfb6ce3af5ea063.tar.bz2 |
Propegate setting autohide behaviour to prefs
When the ShelfLayoutManager changes the autohide behaviour this needs to be
propegated to the ChromeLauncherController otherwise when other parts of the
system query the autohide status they can end up with an incorrect value. This
resolves most of the outstanding issues with the "Autohide Launcher" checkbox in
the context menu.
These is still one issue, specifically if you set autohide off, swipe the
launcher off the screen and then make it reappear, via either swiping or mouse
over. The checkbox will not be checked in this case, but the moment you touch or
click off of the launcher it will hide. After hiding the checkbox will be set as
expected, thus partially resolving that fact that you had to turn on autohide
before you could turn it off. This issue due to the fact that the
ShelfLayoutManager is actually turning off autohide, but setting a handler to
watch for future events and when you interact outside of the launcher setting
autohide on again. Resolving this is outside the scope of this CL/bug since it
either requires changing our UI behjaviour or plumbing information about being
in this state to the LaunchContextMenu, both of which would be unlikely to be
backported to 27.
BUG=chromium:173295
TEST=Visually confirmed that the checkbox is repersenative of the state of
autohide or is only transistorially incorrect.
Review URL: https://chromiumcodereview.appspot.com/12636012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r-- | ash/test/test_launcher_delegate.cc | 6 | ||||
-rw-r--r-- | ash/test/test_launcher_delegate.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ash/test/test_launcher_delegate.cc b/ash/test/test_launcher_delegate.cc index 13ab706..d9ea76b 100644 --- a/ash/test/test_launcher_delegate.cc +++ b/ash/test/test_launcher_delegate.cc @@ -120,5 +120,11 @@ bool TestLauncherDelegate::ShouldShowTooltip(const ash::LauncherItem& item) { return true; } +void TestLauncherDelegate::OnLauncherCreated(Launcher* launcher) { +} + +void TestLauncherDelegate::OnLauncherDestroyed(Launcher* launcher) { +} + } // namespace test } // namespace ash diff --git a/ash/test/test_launcher_delegate.h b/ash/test/test_launcher_delegate.h index f249bee..ccbca32 100644 --- a/ash/test/test_launcher_delegate.h +++ b/ash/test/test_launcher_delegate.h @@ -48,6 +48,8 @@ class TestLauncherDelegate : public LauncherDelegate, virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE; virtual bool ShouldShowTooltip(const LauncherItem& item) OVERRIDE; + virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE; + virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE; private: typedef std::map<aura::Window*, ash::LauncherID> WindowToID; |