OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_EXO_POINTER_H_ | 5 #ifndef COMPONENTS_EXO_POINTER_H_ |
6 #define COMPONENTS_EXO_POINTER_H_ | 6 #define COMPONENTS_EXO_POINTER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 // The position of the pointer surface relative to the pointer location. | 105 // The position of the pointer surface relative to the pointer location. |
106 gfx::Point hotspot_; | 106 gfx::Point hotspot_; |
107 | 107 |
108 // Latest cursor snapshot. | 108 // Latest cursor snapshot. |
109 SkBitmap cursor_bitmap_; | 109 SkBitmap cursor_bitmap_; |
110 | 110 |
111 // The current cursor. | 111 // The current cursor. |
112 ui::Cursor cursor_; | 112 ui::Cursor cursor_; |
113 | 113 |
114 // Scale at which cursor snapshot is captured. The resulting bitmap is scaled | 114 // Scale at which cursor snapshot is captured. |
115 // on displays whose DSF does not match this scale. | |
116 float capture_scale_; | 115 float capture_scale_; |
117 | 116 |
| 117 // Density ratio of the cursor snapshot. The bitmap is scaled on displays with |
| 118 // a different ratio. |
| 119 float capture_ratio_; |
| 120 |
118 // Source used for cursor capture copy output requests. | 121 // Source used for cursor capture copy output requests. |
119 const base::UnguessableToken cursor_capture_source_id_; | 122 const base::UnguessableToken cursor_capture_source_id_; |
120 | 123 |
121 // Last received event type. | 124 // Last received event type. |
122 ui::EventType last_event_type_ = ui::ET_UNKNOWN; | 125 ui::EventType last_event_type_ = ui::ET_UNKNOWN; |
123 | 126 |
124 // Weak pointer factory used for cursor capture callbacks. | 127 // Weak pointer factory used for cursor capture callbacks. |
125 base::WeakPtrFactory<Pointer> cursor_capture_weak_ptr_factory_; | 128 base::WeakPtrFactory<Pointer> cursor_capture_weak_ptr_factory_; |
126 | 129 |
127 DISALLOW_COPY_AND_ASSIGN(Pointer); | 130 DISALLOW_COPY_AND_ASSIGN(Pointer); |
128 }; | 131 }; |
129 | 132 |
130 } // namespace exo | 133 } // namespace exo |
131 | 134 |
132 #endif // COMPONENTS_EXO_POINTER_H_ | 135 #endif // COMPONENTS_EXO_POINTER_H_ |
OLD | NEW |