| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/events/ozone/chromeos/cursor_controller.h" | 5 #include "ui/events/ozone/chromeos/cursor_controller.h" |
| 6 | 6 |
| 7 namespace ui { | 7 namespace ui { |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 delta->set_x(dx * scale); | 36 delta->set_x(dx * scale); |
| 37 delta->set_y(dy * scale); | 37 delta->set_y(dy * scale); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 // static | 42 // static |
| 43 CursorController* CursorController::GetInstance() { | 43 CursorController* CursorController::GetInstance() { |
| 44 return Singleton<CursorController>::get(); | 44 return base::Singleton<CursorController>::get(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void CursorController::SetCursorConfigForWindow(gfx::AcceleratedWidget widget, | 47 void CursorController::SetCursorConfigForWindow(gfx::AcceleratedWidget widget, |
| 48 gfx::Display::Rotation rotation, | 48 gfx::Display::Rotation rotation, |
| 49 float scale) { | 49 float scale) { |
| 50 base::AutoLock lock(window_to_cursor_configuration_map_lock_); | 50 base::AutoLock lock(window_to_cursor_configuration_map_lock_); |
| 51 PerWindowCursorConfiguration config = {rotation, scale}; | 51 PerWindowCursorConfiguration config = {rotation, scale}; |
| 52 window_to_cursor_configuration_map_[widget] = config; | 52 window_to_cursor_configuration_map_[widget] = config; |
| 53 } | 53 } |
| 54 | 54 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 65 TransformCursorMove(it->second.rotation, it->second.scale, delta); | 65 TransformCursorMove(it->second.rotation, it->second.scale, delta); |
| 66 } | 66 } |
| 67 | 67 |
| 68 CursorController::CursorController() { | 68 CursorController::CursorController() { |
| 69 } | 69 } |
| 70 | 70 |
| 71 CursorController::~CursorController() { | 71 CursorController::~CursorController() { |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace ui | 74 } // namespace ui |
| OLD | NEW |