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

Side by Side Diff: ui/base/touch/touch_factory.h

Issue 10836349: CSS Media Query now reports touch-support accurately for Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patched namespace reference. Created 8 years, 3 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
« no previous file with comments | « ui/base/touch/touch_device_win.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_;
112 112
113 // The cursor is hidden if it is idle for a certain amount time. This timer 113 // The cursor is hidden if it is idle for a certain amount time. This timer
114 // is used to keep track of the idleness. 114 // is used to keep track of the idleness.
115 base::OneShotTimer<TouchFactory> cursor_timer_; 115 ::base::OneShotTimer<TouchFactory> cursor_timer_;
116 116
117 // The default cursor. 117 // The default cursor.
118 Cursor arrow_cursor_; 118 Cursor arrow_cursor_;
119 119
120 // The invisible cursor. 120 // The invisible cursor.
121 Cursor invisible_cursor_; 121 Cursor invisible_cursor_;
122 122
123 // NOTE: To keep track of touch devices, we currently maintain a lookup table 123 // NOTE: To keep track of touch devices, we currently maintain a lookup table
124 // to quickly decide if a device is a touch device or not. We also maintain a 124 // to quickly decide if a device is a touch device or not. We also maintain a
125 // list of the touch devices. Ideally, there will be only one touch device, 125 // list of the touch devices. Ideally, there will be only one touch device,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « ui/base/touch/touch_device_win.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698