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

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

Issue 1898223002: Removes most aura dependencies from WindowResizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_aura_from_window_state
Patch Set: nit and merge Created 4 years, 8 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/autoclick/autoclick_controller.cc ('k') | ash/display/screen_position_controller.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"
11 #include "ash/shelf/shelf_layout_manager.h" 11 #include "ash/shelf/shelf_layout_manager.h"
12 #include "ash/shelf/shelf_widget.h" 12 #include "ash/shelf/shelf_widget.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/wm/coordinate_conversion.h" 14 #include "ash/wm/aura/wm_window_aura.h"
15 #include "ash/wm/common/root_window_finder.h"
15 #include "base/logging.h" 16 #include "base/logging.h"
16 #include "ui/aura/client/screen_position_client.h" 17 #include "ui/aura/client/screen_position_client.h"
17 #include "ui/aura/env.h" 18 #include "ui/aura/env.h"
18 #include "ui/aura/window_event_dispatcher.h" 19 #include "ui/aura/window_event_dispatcher.h"
19 #include "ui/gfx/display.h" 20 #include "ui/gfx/display.h"
20 #include "ui/gfx/display_finder.h" 21 #include "ui/gfx/display_finder.h"
21 #include "ui/gfx/screen.h" 22 #include "ui/gfx/screen.h"
22 23
23 namespace ash { 24 namespace ash {
24 25
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 gfx::Point ScreenAsh::GetCursorScreenPoint() { 98 gfx::Point ScreenAsh::GetCursorScreenPoint() {
98 return aura::Env::GetInstance()->last_mouse_location(); 99 return aura::Env::GetInstance()->last_mouse_location();
99 } 100 }
100 101
101 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() { 102 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() {
102 return GetWindowAtScreenPoint( 103 return GetWindowAtScreenPoint(
103 gfx::Screen::GetScreen()->GetCursorScreenPoint()); 104 gfx::Screen::GetScreen()->GetCursorScreenPoint());
104 } 105 }
105 106
106 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { 107 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) {
107 aura::Window* root_window = wm::GetRootWindowAt(point); 108 aura::Window* root_window =
109 wm::WmWindowAura::GetAuraWindow(wm::GetRootWindowAt(point));
108 aura::client::ScreenPositionClient* position_client = 110 aura::client::ScreenPositionClient* position_client =
109 aura::client::GetScreenPositionClient(root_window); 111 aura::client::GetScreenPositionClient(root_window);
110 112
111 gfx::Point local_point = point; 113 gfx::Point local_point = point;
112 if (position_client) 114 if (position_client)
113 position_client->ConvertPointFromScreen(root_window, &local_point); 115 position_client->ConvertPointFromScreen(root_window, &local_point);
114 116
115 return root_window->GetTopWindowContainingPoint(local_point); 117 return root_window->GetTopWindowContainingPoint(local_point);
116 } 118 }
117 119
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 179
178 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { 180 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) {
179 observers_.RemoveObserver(observer); 181 observers_.RemoveObserver(observer);
180 } 182 }
181 183
182 gfx::Screen* ScreenAsh::CloneForShutdown() { 184 gfx::Screen* ScreenAsh::CloneForShutdown() {
183 return new ScreenForShutdown(this); 185 return new ScreenForShutdown(this);
184 } 186 }
185 187
186 } // namespace ash 188 } // namespace ash
OLDNEW
« no previous file with comments | « ash/autoclick/autoclick_controller.cc ('k') | ash/display/screen_position_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698