summaryrefslogtreecommitdiffstats
path: root/ash/shell
diff options
context:
space:
mode:
authorrharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-02 23:04:50 +0000
committerrharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-02 23:04:50 +0000
commit7ed98953e3a29e7032829e366c5fca305519ef06 (patch)
tree94f7b6adb96dc8465b2b910dc6448c47734bc03e /ash/shell
parent069e87415eee51133f8513af5e59adbf1ab80e11 (diff)
downloadchromium_src-7ed98953e3a29e7032829e366c5fca305519ef06.zip
chromium_src-7ed98953e3a29e7032829e366c5fca305519ef06.tar.gz
chromium_src-7ed98953e3a29e7032829e366c5fca305519ef06.tar.bz2
Reland propegate setting autohide behaviour to prefs
Original version broke on the memory bots. Specifically in OnLauncherDestroyed there was a call to remove an observer from the ShelfLayoutManager, which was either already destroyed or in the process of being destroyed. There is no need to make this call. 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. Ran through memory bot to confirm issues have been corrected. Review URL: https://chromiumcodereview.appspot.com/13430014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r--ash/shell/launcher_delegate_impl.cc6
-rw-r--r--ash/shell/launcher_delegate_impl.h2
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.