summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 18:12:51 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 18:12:51 +0000
commite5bd68e150c9d2b46187d2d1a7d948f709760d34 (patch)
tree7873a45605fd045fb5c5e2f4b74ac31cda4d2ec4 /ash
parent23746ecba9f532c29fdc982b623074050242b986 (diff)
downloadchromium_src-e5bd68e150c9d2b46187d2d1a7d948f709760d34.zip
chromium_src-e5bd68e150c9d2b46187d2d1a7d948f709760d34.tar.gz
chromium_src-e5bd68e150c9d2b46187d2d1a7d948f709760d34.tar.bz2
Revert 191376 "Propegate setting autohide behaviour to prefs"
> 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 TBR=rharrison@chromium.org Review URL: https://codereview.chromium.org/13322004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/launcher/launcher.cc2
-rw-r--r--ash/launcher/launcher_delegate.h9
-rw-r--r--ash/shelf/shelf_layout_manager.cc2
-rw-r--r--ash/shelf/shelf_layout_manager.h7
-rw-r--r--ash/shell/launcher_delegate_impl.cc6
-rw-r--r--ash/shell/launcher_delegate_impl.h2
-rw-r--r--ash/test/test_launcher_delegate.cc6
-rw-r--r--ash/test/test_launcher_delegate.h2
8 files changed, 0 insertions, 36 deletions
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc
index de7daf0..c291cb9 100644
--- a/ash/launcher/launcher.cc
+++ b/ash/launcher/launcher.cc
@@ -51,11 +51,9 @@ Launcher::Launcher(LauncherModel* launcher_model,
shelf_widget_->GetNativeView()->SetName("LauncherView");
shelf_widget_->GetNativeView()->SetProperty(
internal::kStayInSameRootWindowKey, true);
- delegate_->OnLauncherCreated(this);
}
Launcher::~Launcher() {
- delegate_->OnLauncherDestroyed(this);
}
// static
diff --git a/ash/launcher/launcher_delegate.h b/ash/launcher/launcher_delegate.h
index bcde60f..5ca045e 100644
--- a/ash/launcher/launcher_delegate.h
+++ b/ash/launcher/launcher_delegate.h
@@ -19,7 +19,6 @@ class Event;
}
namespace ash {
-class Launcher;
// A special menu model which keeps track of an "active" menu item.
class ASH_EXPORT LauncherMenuModel : public ui::SimpleMenuModel {
@@ -88,14 +87,6 @@ class ASH_EXPORT LauncherDelegate {
// Returns true if a tooltip should be shown for the item.
virtual bool ShouldShowTooltip(const LauncherItem& item) = 0;
-
- // Callback used to allow delegate to perform initialization actions that
- // depend on the Launcher being in a known state.
- virtual void OnLauncherCreated(Launcher* launcher) = 0;
-
- // Callback used to inform the delegate that a specific launcher no longer
- // exists.
- virtual void OnLauncherDestroyed(Launcher* launcher) = 0;
};
} // namespace ash
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index b38b803d..305283f 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -180,8 +180,6 @@ void ShelfLayoutManager::SetAutoHideBehavior(ShelfAutoHideBehavior behavior) {
UpdateVisibilityState();
FOR_EACH_OBSERVER(Observer, observers_,
OnAutoHideStateChanged(state_.auto_hide_state));
- FOR_EACH_OBSERVER(Observer, observers_,
- OnAutoHideBehaviorChanged(auto_hide_behavior_));
}
bool ShelfLayoutManager::IsVisible() const {
diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h
index fa16158..40e59a7 100644
--- a/ash/shelf/shelf_layout_manager.h
+++ b/ash/shelf/shelf_layout_manager.h
@@ -49,9 +49,6 @@ class ASH_EXPORT ShelfLayoutManager :
public ash::ShellObserver,
public aura::client::ActivationChangeObserver {
public:
-
- // TODO(rharrison): Move this observer out of ash::internal::
- // namespace. Tracked in crosbug.com/223936
class ASH_EXPORT Observer {
public:
// Called when the target ShelfLayoutManager will be deleted.
@@ -62,10 +59,6 @@ class ASH_EXPORT ShelfLayoutManager :
// Called when the auto hide state is changed.
virtual void OnAutoHideStateChanged(ShelfAutoHideState new_state) {}
-
- // Called when the auto hide behavior is changed.
- virtual void OnAutoHideBehaviorChanged(
- ShelfAutoHideBehavior new_behavior) {}
};
// We reserve a small area at the bottom of the workspace area to ensure that
diff --git a/ash/shell/launcher_delegate_impl.cc b/ash/shell/launcher_delegate_impl.cc
index ec97cd7..fd52c34 100644
--- a/ash/shell/launcher_delegate_impl.cc
+++ b/ash/shell/launcher_delegate_impl.cc
@@ -69,11 +69,5 @@ 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 79c6f59..edf58e8 100644
--- a/ash/shell/launcher_delegate_impl.h
+++ b/ash/shell/launcher_delegate_impl.h
@@ -39,8 +39,6 @@ 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.
diff --git a/ash/test/test_launcher_delegate.cc b/ash/test/test_launcher_delegate.cc
index d9ea76b..13ab706 100644
--- a/ash/test/test_launcher_delegate.cc
+++ b/ash/test/test_launcher_delegate.cc
@@ -120,11 +120,5 @@ 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 ccbca32..f249bee 100644
--- a/ash/test/test_launcher_delegate.h
+++ b/ash/test/test_launcher_delegate.h
@@ -48,8 +48,6 @@ 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;