| OLD | NEW |
| 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 #ifndef UI_BASE_TOUCH_TOUCH_FACTORY_H_ | 5 #ifndef UI_BASE_TOUCH_TOUCH_FACTORY_H_ |
| 6 #define UI_BASE_TOUCH_TOUCH_FACTORY_H_ | 6 #define UI_BASE_TOUCH_TOUCH_FACTORY_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 // Whether any touch device is currently present and enabled. | 93 // Whether any touch device is currently present and enabled. |
| 94 bool IsTouchDevicePresent(); | 94 bool IsTouchDevicePresent(); |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 void HideCursorForInactivity() { | 97 void HideCursorForInactivity() { |
| 98 SetCursorVisible(false, false); | 98 SetCursorVisible(false, false); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // Requirement for Signleton | 101 // Requirement for Singleton |
| 102 friend struct DefaultSingletonTraits<TouchFactory>; | 102 friend struct DefaultSingletonTraits<TouchFactory>; |
| 103 | 103 |
| 104 // The default cursor is hidden after startup, and when the mouse pointer is | 104 // The default cursor is hidden after startup, and when the mouse pointer is |
| 105 // idle for a while. Once there is some event from a mouse device, the cursor | 105 // idle for a while. Once there is some event from a mouse device, the cursor |
| 106 // is immediately displayed. | 106 // is immediately displayed. |
| 107 bool is_cursor_visible_; | 107 bool is_cursor_visible_; |
| 108 | 108 |
| 109 // Touch events are currently disabled by default. It can be turned on using | 109 // Touch events are currently disabled by default. It can be turned on using |
| 110 // |kEnableTouchEvents| switch. | 110 // |kEnableTouchEvents| switch. |
| 111 bool touch_events_allowed_; | 111 bool touch_events_allowed_; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 // A lookup table for slots in use for a touch event. | 166 // A lookup table for slots in use for a touch event. |
| 167 std::bitset<kMaxTouchPoints> slots_used_; | 167 std::bitset<kMaxTouchPoints> slots_used_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(TouchFactory); | 169 DISALLOW_COPY_AND_ASSIGN(TouchFactory); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace ui | 172 } // namespace ui |
| 173 | 173 |
| 174 #endif // UI_BASE_TOUCH_TOUCH_FACTORY_H_ | 174 #endif // UI_BASE_TOUCH_TOUCH_FACTORY_H_ |
| OLD | NEW |