Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: ash/display/screen_ash.cc

Issue 259253002: Add OnDisplayMetricsChanged in DisplayObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_orientation
Patch Set: with Linux Aura tests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/screen_ash.h" 5 #include "ash/display/screen_ash.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/root_window_settings.h" 10 #include "ash/root_window_settings.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 return display_manager->GetDisplayAt(0).id() == 181 return display_manager->GetDisplayAt(0).id() ==
182 Shell::GetScreen()->GetPrimaryDisplay().id() ? 182 Shell::GetScreen()->GetPrimaryDisplay().id() ?
183 display_manager->GetDisplayAt(1) : display_manager->GetDisplayAt(0); 183 display_manager->GetDisplayAt(1) : display_manager->GetDisplayAt(0);
184 } 184 }
185 185
186 // static 186 // static
187 const gfx::Display& ScreenAsh::GetDisplayForId(int64 display_id) { 187 const gfx::Display& ScreenAsh::GetDisplayForId(int64 display_id) {
188 return GetDisplayManager()->GetDisplayForId(display_id); 188 return GetDisplayManager()->GetDisplayForId(display_id);
189 } 189 }
190 190
191 void ScreenAsh::NotifyBoundsChanged(const gfx::Display& display) { 191 void ScreenAsh::NotifyMetricsChanged(
192 const gfx::Display& display, gfx::DisplayObserver::MetricsType metrics) {
192 FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_, 193 FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_,
193 OnDisplayBoundsChanged(display)); 194 OnDisplayMetricsChanged(display, metrics));
194 } 195 }
195 196
196 void ScreenAsh::NotifyDisplayAdded(const gfx::Display& display) { 197 void ScreenAsh::NotifyDisplayAdded(const gfx::Display& display) {
197 FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_, OnDisplayAdded(display)); 198 FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_, OnDisplayAdded(display));
198 } 199 }
199 200
200 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) { 201 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) {
201 FOR_EACH_OBSERVER( 202 FOR_EACH_OBSERVER(
202 gfx::DisplayObserver, observers_, OnDisplayRemoved(display)); 203 gfx::DisplayObserver, observers_, OnDisplayRemoved(display));
203 } 204 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 280
280 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { 281 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) {
281 observers_.RemoveObserver(observer); 282 observers_.RemoveObserver(observer);
282 } 283 }
283 284
284 gfx::Screen* ScreenAsh::CloneForShutdown() { 285 gfx::Screen* ScreenAsh::CloneForShutdown() {
285 return new ScreenForShutdown(this); 286 return new ScreenForShutdown(this);
286 } 287 }
287 288
288 } // namespace ash 289 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698