summaryrefslogtreecommitdiffstats
path: root/ash/shelf
diff options
context:
space:
mode:
authormlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 01:26:01 +0000
committermlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 01:26:01 +0000
commit0c5703d1a2552eb3d15a7c589f34e3acb6bfc881 (patch)
tree0ad7e6718c9e33056f316ad099bcd3602be8c9d4 /ash/shelf
parent2418349939b669d4b6b626ad18b67dba6862ac24 (diff)
downloadchromium_src-0c5703d1a2552eb3d15a7c589f34e3acb6bfc881.zip
chromium_src-0c5703d1a2552eb3d15a7c589f34e3acb6bfc881.tar.gz
chromium_src-0c5703d1a2552eb3d15a7c589f34e3acb6bfc881.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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271768 Review URL: https://codereview.chromium.org/259253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272040 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_;