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

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: 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
« no previous file with comments | « ash/display/screen_ash.h ('k') | ash/shelf/shelf_window_watcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(const gfx::Display& display,
192 FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_, 192 uint32_t metrics) {
193 OnDisplayBoundsChanged(display)); 193 FOR_EACH_OBSERVER(gfx::DisplayObserver,
194 observers_,
195 OnDisplayMetricsChanged(display, metrics));
194 } 196 }
195 197
196 void ScreenAsh::NotifyDisplayAdded(const gfx::Display& display) { 198 void ScreenAsh::NotifyDisplayAdded(const gfx::Display& display) {
197 FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_, OnDisplayAdded(display)); 199 FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_, OnDisplayAdded(display));
198 } 200 }
199 201
200 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) { 202 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) {
201 FOR_EACH_OBSERVER( 203 FOR_EACH_OBSERVER(
202 gfx::DisplayObserver, observers_, OnDisplayRemoved(display)); 204 gfx::DisplayObserver, observers_, OnDisplayRemoved(display));
203 } 205 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 281
280 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { 282 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) {
281 observers_.RemoveObserver(observer); 283 observers_.RemoveObserver(observer);
282 } 284 }
283 285
284 gfx::Screen* ScreenAsh::CloneForShutdown() { 286 gfx::Screen* ScreenAsh::CloneForShutdown() {
285 return new ScreenForShutdown(this); 287 return new ScreenForShutdown(this);
286 } 288 }
287 289
288 } // namespace ash 290 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/screen_ash.h ('k') | ash/shelf/shelf_window_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698