| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ | 5 #ifndef UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ |
| 6 #define UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ | 6 #define UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // then we set (dx, dy) = (-6, 4) | 54 // then we set (dx, dy) = (-6, 4) |
| 55 // | 55 // |
| 56 // Since scale generally includes DSF, you can think of the input | 56 // Since scale generally includes DSF, you can think of the input |
| 57 // vector unit as DIP and the output vector unit as pixels. | 57 // vector unit as DIP and the output vector unit as pixels. |
| 58 void ApplyCursorConfigForWindow(gfx::AcceleratedWidget widget, | 58 void ApplyCursorConfigForWindow(gfx::AcceleratedWidget widget, |
| 59 gfx::Vector2dF* delta) const; | 59 gfx::Vector2dF* delta) const; |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 CursorController(); | 62 CursorController(); |
| 63 ~CursorController(); | 63 ~CursorController(); |
| 64 friend struct DefaultSingletonTraits<CursorController>; | 64 friend struct base::DefaultSingletonTraits<CursorController>; |
| 65 | 65 |
| 66 struct PerWindowCursorConfiguration { | 66 struct PerWindowCursorConfiguration { |
| 67 gfx::Display::Rotation rotation; | 67 gfx::Display::Rotation rotation; |
| 68 float scale; | 68 float scale; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 typedef std::map<gfx::AcceleratedWidget, PerWindowCursorConfiguration> | 71 typedef std::map<gfx::AcceleratedWidget, PerWindowCursorConfiguration> |
| 72 WindowToCursorConfigurationMap; | 72 WindowToCursorConfigurationMap; |
| 73 | 73 |
| 74 WindowToCursorConfigurationMap window_to_cursor_configuration_map_; | 74 WindowToCursorConfigurationMap window_to_cursor_configuration_map_; |
| 75 mutable base::Lock window_to_cursor_configuration_map_lock_; | 75 mutable base::Lock window_to_cursor_configuration_map_lock_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(CursorController); | 77 DISALLOW_COPY_AND_ASSIGN(CursorController); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace ui | 80 } // namespace ui |
| 81 | 81 |
| 82 #endif // UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ | 82 #endif // UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ |
| OLD | NEW |