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

Side by Side Diff: third_party/WebKit/Source/platform/PlatformKeyboardEvent.h

Issue 2036643003: Creat a KeyboardEventManager class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move accessKeyModifiers to PlatformKeyboardEvent Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008 Collabora, Ltd. All rights reserved. 3 * Copyright (C) 2008 Collabora, Ltd. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 int windowsVirtualKeyCode() const { return m_windowsVirtualKeyCode; } 82 int windowsVirtualKeyCode() const { return m_windowsVirtualKeyCode; }
83 83
84 int nativeVirtualKeyCode() const { return m_nativeVirtualKeyCode; } 84 int nativeVirtualKeyCode() const { return m_nativeVirtualKeyCode; }
85 85
86 bool isAutoRepeat() const { return getModifiers() & IsAutoRepeat; } 86 bool isAutoRepeat() const { return getModifiers() & IsAutoRepeat; }
87 bool isKeypad() const { return getModifiers() & IsKeyPad; } 87 bool isKeypad() const { return getModifiers() & IsKeyPad; }
88 bool isSystemKey() const { return m_isSystemKey; } 88 bool isSystemKey() const { return m_isSystemKey; }
89 89
90 PLATFORM_EXPORT static bool currentCapsLockState(); 90 PLATFORM_EXPORT static bool currentCapsLockState();
91 PLATFORM_EXPORT static Modifiers getCurrentModifierState(); 91 PLATFORM_EXPORT static Modifiers getCurrentModifierState();
92 PLATFORM_EXPORT static PlatformEvent::Modifiers accessKeyModifiers();
Rick Byers 2016/06/08 17:58:16 please add a comment describing what this means (i
Navid Zolghadr 2016/06/08 18:55:08 Done.
92 93
93 protected: 94 protected:
94 String m_text; 95 String m_text;
95 String m_unmodifiedText; 96 String m_unmodifiedText;
96 String m_keyIdentifier; 97 String m_keyIdentifier;
97 String m_code; 98 String m_code;
98 String m_key; 99 String m_key;
99 int m_windowsVirtualKeyCode; 100 int m_windowsVirtualKeyCode;
100 int m_nativeVirtualKeyCode; 101 int m_nativeVirtualKeyCode;
101 bool m_isSystemKey; 102 bool m_isSystemKey;
102 103
103 private: 104 private:
104 friend class Internals; 105 friend class Internals;
105 enum OverrideCapsLockState { 106 enum OverrideCapsLockState {
106 Default, 107 Default,
107 On, 108 On,
108 Off 109 Off
109 }; 110 };
110 // Allows overriding the current caps lock state for testing purposes. 111 // Allows overriding the current caps lock state for testing purposes.
111 PLATFORM_EXPORT static void setCurrentCapsLockState(OverrideCapsLockState st ate) { s_overrideCapsLockState = state; } 112 PLATFORM_EXPORT static void setCurrentCapsLockState(OverrideCapsLockState st ate) { s_overrideCapsLockState = state; }
112 PLATFORM_EXPORT static OverrideCapsLockState s_overrideCapsLockState; 113 PLATFORM_EXPORT static OverrideCapsLockState s_overrideCapsLockState;
113 }; 114 };
114 115
115 } // namespace blink 116 } // namespace blink
116 117
117 #endif // PlatformKeyboardEvent_h 118 #endif // PlatformKeyboardEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698