summaryrefslogtreecommitdiffstats
path: root/ash/shelf
diff options
context:
space:
mode:
authormlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 21:52:35 +0000
committermlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 21:52:35 +0000
commit582507170e6f19ead4447a8e098fc58f79ddbfa9 (patch)
treedbdd8f80766f4d95bdc1fa43c32f4d56ebf93b5c /ash/shelf
parentdf3ecfdef1498c99b11ce31e2cd5e7437a341a21 (diff)
downloadchromium_src-582507170e6f19ead4447a8e098fc58f79ddbfa9.zip
chromium_src-582507170e6f19ead4447a8e098fc58f79ddbfa9.tar.gz
chromium_src-582507170e6f19ead4447a8e098fc58f79ddbfa9.tar.bz2
Add OnDisplayMetricsChanged in DisplayObserver.
This replaces OnDisplayBoundsChanged and add a MetricsType parameter so consumers can now which metrics has changed. The current set of MetricsType include bounds, workarea and rotation. BUG=162827 Review URL: https://codereview.chromium.org/259253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shelf')
-rw-r--r--ash/shelf/shelf_window_watcher.cc7
-rw-r--r--ash/shelf/shelf_window_watcher.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/ash/shelf/shelf_window_watcher.cc b/ash/shelf/shelf_window_watcher.cc
index b16deea..8cc31b6 100644
--- a/ash/shelf/shelf_window_watcher.cc
+++ b/ash/shelf/shelf_window_watcher.cc
@@ -267,9 +267,6 @@ void ShelfWindowWatcher::OnWindowPropertyChanged(aura::Window* window,
AddShelfItem(window);
}
-void ShelfWindowWatcher::OnDisplayBoundsChanged(const gfx::Display& display) {
-}
-
void ShelfWindowWatcher::OnDisplayAdded(const gfx::Display& new_display) {
// Add a new RootWindow and its ActivationClient to observed list.
aura::Window* root_window = Shell::GetInstance()->display_controller()->
@@ -288,4 +285,8 @@ void ShelfWindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) {
// Do nothing here.
}
+void ShelfWindowWatcher::OnDisplayMetricsChanged(const gfx::Display&,
+ uint32_t) {
+}
+
} // namespace ash
diff --git a/ash/shelf/shelf_window_watcher.h b/ash/shelf/shelf_window_watcher.h
index cb99bc7..da16e54 100644
--- a/ash/shelf/shelf_window_watcher.h
+++ b/ash/shelf/shelf_window_watcher.h
@@ -115,9 +115,10 @@ class ShelfWindowWatcher : public aura::client::ActivationChangeObserver,
intptr_t old) OVERRIDE;
// gfx::DisplayObserver overrides:
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE;
virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
+ virtual void OnDisplayMetricsChanged(const gfx::Display& display,
+ uint32_t metrics) OVERRIDE;
// Owned by Shell.
ShelfModel* model_;