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

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: Moved IsTouchDevicePresent to ui::base Created 8 years, 4 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
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_;
(...skipping 53 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
« ui/base/touch/touch_device.cc ('K') | « ui/base/touch/touch_device.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698