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

Side by Side Diff: ui/events/event_utils.h

Issue 308023002: Add EF_IS_REPEAT flag to KeyEvent to handle repeated accelerators correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use ui::EF_IS_REPEAT in test instead Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/events/event_unittest.cc ('k') | ui/views/focus/focus_manager.cc » ('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_EVENTS_EVENT_UTILS_H_ 5 #ifndef UI_EVENTS_EVENT_UTILS_H_
6 #define UI_EVENTS_EVENT_UTILS_H_ 6 #define UI_EVENTS_EVENT_UTILS_H_
7 7
8 #include "base/event_types.h" 8 #include "base/event_types.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 EVENTS_EXPORT int GetModifiersFromKeyState(); 154 EVENTS_EXPORT int GetModifiersFromKeyState();
155 155
156 // Returns true if |message| identifies a mouse event that was generated as the 156 // Returns true if |message| identifies a mouse event that was generated as the
157 // result of a touch event. 157 // result of a touch event.
158 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message); 158 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message);
159 159
160 // Converts scan code and lParam each other. The scan code 160 // Converts scan code and lParam each other. The scan code
161 // representing an extended key contains 0xE000 bits. 161 // representing an extended key contains 0xE000 bits.
162 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); 162 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam);
163 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); 163 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code);
164
165 // Overrides the ui::KeyEvent's flags for test.
166 // They're not exported to prevent it from leaking into production code.
167 void SetKeyEventFlagsForTest(int flags);
168 void ResetKeyEventFlagsForTest();
169
164 #endif 170 #endif
165 171
166 // Registers a custom event type. 172 // Registers a custom event type.
167 EVENTS_EXPORT int RegisterCustomEventType(); 173 EVENTS_EXPORT int RegisterCustomEventType();
168 174
169 } // namespace ui 175 } // namespace ui
170 176
171 #endif // UI_EVENTS_EVENT_UTILS_H_ 177 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/event_unittest.cc ('k') | ui/views/focus/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698