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

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

Issue 2949353003: Implement large cursors in Mushrome. (Closed)
Patch Set: Remove old cursor.h includes. Created 3 years, 6 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/native_cursor_manager_ash_classic.h" 5 #include "ash/wm/native_cursor_manager_ash_classic.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 cursor.set_device_scale_factor(image_cursors_->GetScale()); 114 cursor.set_device_scale_factor(image_cursors_->GetScale());
115 115
116 delegate->CommitCursor(cursor); 116 delegate->CommitCursor(cursor);
117 117
118 if (delegate->IsCursorVisible()) 118 if (delegate->IsCursorVisible())
119 SetCursorOnAllRootWindows(cursor); 119 SetCursorOnAllRootWindows(cursor);
120 } 120 }
121 121
122 void NativeCursorManagerAshClassic::SetCursorSet( 122 void NativeCursorManagerAshClassic::SetCursorSet(
123 ui::CursorSetType cursor_set, 123 ui::CursorSet cursor_set,
124 ::wm::NativeCursorManagerDelegate* delegate) { 124 ::wm::NativeCursorManagerDelegate* delegate) {
125 image_cursors_->SetCursorSet(cursor_set); 125 image_cursors_->SetCursorSet(cursor_set);
126 delegate->CommitCursorSet(cursor_set); 126 delegate->CommitCursorSet(cursor_set);
127 127
128 // Sets the cursor to reflect the scale change immediately. 128 // Sets the cursor to reflect the scale change immediately.
129 if (delegate->IsCursorVisible()) 129 if (delegate->IsCursorVisible())
130 SetCursor(delegate->GetCursor(), delegate); 130 SetCursor(delegate->GetCursor(), delegate);
131 131
132 Shell::Get() 132 Shell::Get()
133 ->window_tree_host_manager() 133 ->window_tree_host_manager()
(...skipping 27 matching lines...) Expand all
161 disabled_cursor_location_); 161 disabled_cursor_location_);
162 } else { 162 } else {
163 disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location(); 163 disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location();
164 } 164 }
165 165
166 SetVisibility(delegate->IsCursorVisible(), delegate); 166 SetVisibility(delegate->IsCursorVisible(), delegate);
167 NotifyMouseEventsEnableStateChange(enabled); 167 NotifyMouseEventsEnableStateChange(enabled);
168 } 168 }
169 169
170 } // namespace ash 170 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698