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

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

Issue 249303002: Revert of Use platform's device scale factor for cursor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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/display_controller.h" 8 #include "ash/display/display_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/image_cursors.h" 10 #include "ash/wm/image_cursors.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 image_cursors_->SetPlatformCursor(&new_cursor); 88 image_cursors_->SetPlatformCursor(&new_cursor);
89 } else { 89 } else {
90 gfx::NativeCursor invisible_cursor(ui::kCursorNone); 90 gfx::NativeCursor invisible_cursor(ui::kCursorNone);
91 image_cursors_->SetPlatformCursor(&invisible_cursor); 91 image_cursors_->SetPlatformCursor(&invisible_cursor);
92 if (new_cursor == ui::kCursorCustom) { 92 if (new_cursor == ui::kCursorCustom) {
93 new_cursor = invisible_cursor; 93 new_cursor = invisible_cursor;
94 } else { 94 } else {
95 new_cursor.SetPlatformCursor(invisible_cursor.platform()); 95 new_cursor.SetPlatformCursor(invisible_cursor.platform());
96 } 96 }
97 } 97 }
98 new_cursor.set_device_scale_factor(image_cursors_->GetScale()); 98 new_cursor.set_device_scale_factor(
99 image_cursors_->GetDisplay().device_scale_factor());
99 100
100 delegate->CommitCursor(new_cursor); 101 delegate->CommitCursor(new_cursor);
101 102
102 if (delegate->IsCursorVisible()) 103 if (delegate->IsCursorVisible())
103 SetCursorOnAllRootWindows(new_cursor); 104 SetCursorOnAllRootWindows(new_cursor);
104 } 105 }
105 106
106 void AshNativeCursorManager::SetCursorSet( 107 void AshNativeCursorManager::SetCursorSet(
107 ui::CursorSetType cursor_set, 108 ui::CursorSetType cursor_set,
108 ::wm::NativeCursorManagerDelegate* delegate) { 109 ::wm::NativeCursorManagerDelegate* delegate) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 disabled_cursor_location_); 146 disabled_cursor_location_);
146 } else { 147 } else {
147 disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location(); 148 disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location();
148 } 149 }
149 150
150 SetVisibility(delegate->IsCursorVisible(), delegate); 151 SetVisibility(delegate->IsCursorVisible(), delegate);
151 NotifyMouseEventsEnableStateChange(enabled); 152 NotifyMouseEventsEnableStateChange(enabled);
152 } 153 }
153 154
154 } // namespace ash 155 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/cursor_manager_test_api.cc ('k') | ash/wm/ash_native_cursor_manager_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698