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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 10 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 | « ui/aura/window.cc ('k') | ui/aura/window_tree_host_platform.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 14 matching lines...) Expand all
25 #include "ui/gfx/geometry/point_conversions.h" 25 #include "ui/gfx/geometry/point_conversions.h"
26 #include "ui/gfx/geometry/size_conversions.h" 26 #include "ui/gfx/geometry/size_conversions.h"
27 #include "ui/gfx/screen.h" 27 #include "ui/gfx/screen.h"
28 28
29 namespace aura { 29 namespace aura {
30 30
31 const char kWindowTreeHostForAcceleratedWidget[] = 31 const char kWindowTreeHostForAcceleratedWidget[] =
32 "__AURA_WINDOW_TREE_HOST_ACCELERATED_WIDGET__"; 32 "__AURA_WINDOW_TREE_HOST_ACCELERATED_WIDGET__";
33 33
34 float GetDeviceScaleFactorFromDisplay(Window* window) { 34 float GetDeviceScaleFactorFromDisplay(Window* window) {
35 gfx::Display display = gfx::Screen::GetScreenFor(window)-> 35 gfx::Display display =
36 GetDisplayNearestWindow(window); 36 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window);
37 DCHECK(display.is_valid()); 37 DCHECK(display.is_valid());
38 return display.device_scale_factor(); 38 return display.device_scale_factor();
39 } 39 }
40 40
41 //////////////////////////////////////////////////////////////////////////////// 41 ////////////////////////////////////////////////////////////////////////////////
42 // WindowTreeHost, public: 42 // WindowTreeHost, public:
43 43
44 WindowTreeHost::~WindowTreeHost() { 44 WindowTreeHost::~WindowTreeHost() {
45 DCHECK(!compositor_) << "compositor must be destroyed before root window"; 45 DCHECK(!compositor_) << "compositor must be destroyed before root window";
46 if (owned_input_method_) { 46 if (owned_input_method_) {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 //////////////////////////////////////////////////////////////////////////////// 307 ////////////////////////////////////////////////////////////////////////////////
308 // WindowTreeHost, private: 308 // WindowTreeHost, private:
309 309
310 void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location, 310 void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location,
311 const gfx::Point& host_location) { 311 const gfx::Point& host_location) {
312 last_cursor_request_position_in_host_ = host_location; 312 last_cursor_request_position_in_host_ = host_location;
313 MoveCursorToNative(host_location); 313 MoveCursorToNative(host_location);
314 client::CursorClient* cursor_client = client::GetCursorClient(window()); 314 client::CursorClient* cursor_client = client::GetCursorClient(window());
315 if (cursor_client) { 315 if (cursor_client) {
316 const gfx::Display& display = 316 const gfx::Display& display =
317 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); 317 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window());
318 cursor_client->SetDisplay(display); 318 cursor_client->SetDisplay(display);
319 } 319 }
320 dispatcher()->OnCursorMovedToRootLocation(root_location); 320 dispatcher()->OnCursorMovedToRootLocation(root_location);
321 } 321 }
322 322
323 } // namespace aura 323 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window.cc ('k') | ui/aura/window_tree_host_platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698