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

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

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 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/root_window_transformers_unittest.cc ('k') | ash/display/screen_ash_unittest.cc » ('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_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/display/window_tree_host_manager.h" 8 #include "ash/display/window_tree_host_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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) { 92 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) {
93 FOR_EACH_OBSERVER( 93 FOR_EACH_OBSERVER(
94 gfx::DisplayObserver, observers_, OnDisplayRemoved(display)); 94 gfx::DisplayObserver, observers_, OnDisplayRemoved(display));
95 } 95 }
96 96
97 gfx::Point ScreenAsh::GetCursorScreenPoint() { 97 gfx::Point ScreenAsh::GetCursorScreenPoint() {
98 return aura::Env::GetInstance()->last_mouse_location(); 98 return aura::Env::GetInstance()->last_mouse_location();
99 } 99 }
100 100
101 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() { 101 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() {
102 return GetWindowAtScreenPoint(Shell::GetScreen()->GetCursorScreenPoint()); 102 return GetWindowAtScreenPoint(
103 gfx::Screen::GetScreen()->GetCursorScreenPoint());
103 } 104 }
104 105
105 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { 106 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) {
106 aura::Window* root_window = wm::GetRootWindowAt(point); 107 aura::Window* root_window = wm::GetRootWindowAt(point);
107 aura::client::ScreenPositionClient* position_client = 108 aura::client::ScreenPositionClient* position_client =
108 aura::client::GetScreenPositionClient(root_window); 109 aura::client::GetScreenPositionClient(root_window);
109 110
110 gfx::Point local_point = point; 111 gfx::Point local_point = point;
111 if (position_client) 112 if (position_client)
112 position_client->ConvertPointFromScreen(root_window, &local_point); 113 position_client->ConvertPointFromScreen(root_window, &local_point);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 177
177 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { 178 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) {
178 observers_.RemoveObserver(observer); 179 observers_.RemoveObserver(observer);
179 } 180 }
180 181
181 gfx::Screen* ScreenAsh::CloneForShutdown() { 182 gfx::Screen* ScreenAsh::CloneForShutdown() {
182 return new ScreenForShutdown(this); 183 return new ScreenForShutdown(this);
183 } 184 }
184 185
185 } // namespace ash 186 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/root_window_transformers_unittest.cc ('k') | ash/display/screen_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698