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/shell | |
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/shell')
-rw-r--r-- | ash/shell/launcher_delegate_impl.cc | 6 | ||||
-rw-r--r-- | ash/shell/launcher_delegate_impl.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ash/shell/launcher_delegate_impl.cc b/ash/shell/launcher_delegate_impl.cc index fd52c34..ec97cd7 100644 --- a/ash/shell/launcher_delegate_impl.cc +++ b/ash/shell/launcher_delegate_impl.cc @@ -69,5 +69,11 @@ bool LauncherDelegateImpl::ShouldShowTooltip(const ash::LauncherItem& item) { return true; } +void LauncherDelegateImpl::OnLauncherCreated(Launcher* launcher) { +} + +void LauncherDelegateImpl::OnLauncherDestroyed(Launcher* launcher) { +} + } // namespace shell } // namespace ash diff --git a/ash/shell/launcher_delegate_impl.h b/ash/shell/launcher_delegate_impl.h index edf58e8..79c6f59 100644 --- a/ash/shell/launcher_delegate_impl.h +++ b/ash/shell/launcher_delegate_impl.h @@ -39,6 +39,8 @@ class LauncherDelegateImpl : public ash::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: // Used to update Launcher. Owned by main. |