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

Side by Side Diff: ash/wm/ash_native_cursor_manager.cc

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/wm/ash_native_cursor_manager.h ('k') | ash/wm/ash_native_cursor_manager_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/ash_native_cursor_manager.h" 5 #include "ash/wm/ash_native_cursor_manager.h"
6 6
7 #include "ash/display/cursor_window_controller.h" 7 #include "ash/display/cursor_window_controller.h"
8 #include "ash/display/window_tree_host_manager.h" 8 #include "ash/display/window_tree_host_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 void AshNativeCursorManager::SetNativeCursorEnabled(bool enabled) { 69 void AshNativeCursorManager::SetNativeCursorEnabled(bool enabled) {
70 native_cursor_enabled_ = enabled; 70 native_cursor_enabled_ = enabled;
71 71
72 ::wm::CursorManager* cursor_manager = 72 ::wm::CursorManager* cursor_manager =
73 Shell::GetInstance()->cursor_manager(); 73 Shell::GetInstance()->cursor_manager();
74 SetCursor(cursor_manager->GetCursor(), cursor_manager); 74 SetCursor(cursor_manager->GetCursor(), cursor_manager);
75 } 75 }
76 76
77 void AshNativeCursorManager::SetDisplay( 77 void AshNativeCursorManager::SetDisplay(
78 const gfx::Display& display, 78 const display::Display& display,
79 ::wm::NativeCursorManagerDelegate* delegate) { 79 ::wm::NativeCursorManagerDelegate* delegate) {
80 DCHECK(display.is_valid()); 80 DCHECK(display.is_valid());
81 // Use the platform's device scale factor instead of the display's, which 81 // Use the platform's device scale factor instead of the display's, which
82 // might have been adjusted for the UI scale. 82 // might have been adjusted for the UI scale.
83 const float original_scale = Shell::GetInstance()->display_manager()-> 83 const float original_scale = Shell::GetInstance()->display_manager()->
84 GetDisplayInfo(display.id()).device_scale_factor(); 84 GetDisplayInfo(display.id()).device_scale_factor();
85 #if defined(OS_CHROMEOS) 85 #if defined(OS_CHROMEOS)
86 // And use the nearest resource scale factor. 86 // And use the nearest resource scale factor.
87 const float cursor_scale = ui::GetScaleForScaleFactor( 87 const float cursor_scale = ui::GetScaleForScaleFactor(
88 ui::GetSupportedScaleFactor(original_scale)); 88 ui::GetSupportedScaleFactor(original_scale));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 disabled_cursor_location_); 168 disabled_cursor_location_);
169 } else { 169 } else {
170 disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location(); 170 disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location();
171 } 171 }
172 172
173 SetVisibility(delegate->IsCursorVisible(), delegate); 173 SetVisibility(delegate->IsCursorVisible(), delegate);
174 NotifyMouseEventsEnableStateChange(enabled); 174 NotifyMouseEventsEnableStateChange(enabled);
175 } 175 }
176 176
177 } // namespace ash 177 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/ash_native_cursor_manager.h ('k') | ash/wm/ash_native_cursor_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698