summaryrefslogtreecommitdiffstats
path: root/ash/shelf
diff options
context:
space:
mode:
authorsimon.hong81@gmail.com <simon.hong81@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 03:52:32 +0000
committersimon.hong81@gmail.com <simon.hong81@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 03:52:32 +0000
commit46500c874a9c765f98b962d16184f57e898bb91c (patch)
tree99e15453d1b64a6e5b6724e32b4250297c1aeb50 /ash/shelf
parentda6885b1b4f0d70d1a66a2eec26b8c407351a11e (diff)
downloadchromium_src-46500c874a9c765f98b962d16184f57e898bb91c.zip
chromium_src-46500c874a9c765f98b962d16184f57e898bb91c.tar.gz
chromium_src-46500c874a9c765f98b962d16184f57e898bb91c.tar.bz2
Update ShelfAutoHideBehavior pref of only changed shelf widget
When one of ShelfWidget's AutoHideBehavior is changed, all ShelfWidget's pref is updated. To to this, I added RootWindow parameter to ShelfWidgetObserver::OnAutoHideBehaviorChanged(). When observer is notified, only root window of changed shelf widget's pref is updated. R=sky@chromium.org BUG=NONE TEST=Compiles Review URL: https://chromiumcodereview.appspot.com/18124003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shelf')
-rw-r--r--ash/shelf/shelf_layout_manager.cc3
-rw-r--r--ash/shelf/shelf_layout_manager_observer.h7
2 files changed, 8 insertions, 2 deletions
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index b0dab2f..fec998b 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -213,7 +213,8 @@ void ShelfLayoutManager::SetAutoHideBehavior(ShelfAutoHideBehavior behavior) {
FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_,
OnAutoHideStateChanged(state_.auto_hide_state));
FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_,
- OnAutoHideBehaviorChanged(auto_hide_behavior_));
+ OnAutoHideBehaviorChanged(root_window_,
+ auto_hide_behavior_));
}
void ShelfLayoutManager::PrepareForShutdown() {
diff --git a/ash/shelf/shelf_layout_manager_observer.h b/ash/shelf/shelf_layout_manager_observer.h
index 120238b..328e209 100644
--- a/ash/shelf/shelf_layout_manager_observer.h
+++ b/ash/shelf/shelf_layout_manager_observer.h
@@ -8,6 +8,10 @@
#include "ash/ash_export.h"
#include "ash/shelf/shelf_types.h"
+namespace aura {
+class RootWindow;
+}
+
namespace ash {
class ASH_EXPORT ShelfLayoutManagerObserver {
@@ -24,7 +28,8 @@ class ASH_EXPORT ShelfLayoutManagerObserver {
virtual void OnAutoHideStateChanged(ShelfAutoHideState new_state) {}
// Called when the auto hide behavior is changed.
- virtual void OnAutoHideBehaviorChanged(ShelfAutoHideBehavior new_behavior) {}
+ virtual void OnAutoHideBehaviorChanged(aura::RootWindow* root_window,
+ ShelfAutoHideBehavior new_behavior) {}
};
} // namespace ash