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

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

Issue 841263005: Use DOM- rather than Windows-based key code for non-layout cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments (sadrul) Created 5 years, 8 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_EVENTS_EVENT_H_ 5 #ifndef UI_EVENTS_EVENT_H_
6 #define UI_EVENTS_EVENT_H_ 6 #define UI_EVENTS_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 // True if this is a character event, false if this is a keystroke event. 772 // True if this is a character event, false if this is a keystroke event.
773 bool is_char_; 773 bool is_char_;
774 774
775 // The platform related keycode value. For XKB, it's keysym value. 775 // The platform related keycode value. For XKB, it's keysym value.
776 // For now, this is used for CharacterComposer in ChromeOS. 776 // For now, this is used for CharacterComposer in ChromeOS.
777 mutable uint32 platform_keycode_; 777 mutable uint32 platform_keycode_;
778 778
779 // TODO(kpschoedel): refactor so that key_ and character_ are not mutable. 779 // TODO(kpschoedel): refactor so that key_ and character_ are not mutable.
780 // This requires defining the KeyEvent completely at construction rather 780 // This requires defining the KeyEvent completely at construction rather
781 // than lazily under GetCharacter(), which likely also means removing 781 // than lazily under GetCharacter(), which likely also means removing
782 // the two 'incomplete' constructors. 782 // the two 'incomplete' constructors. crbug.com/444045
783 // 783 //
784 // DOM KeyboardEvent |key| 784 // DOM KeyboardEvent |key|
785 // http://www.w3.org/TR/DOM-Level-3-Events-key/ 785 // http://www.w3.org/TR/DOM-Level-3-Events-key/
786 // 786 //
787 // This value, together with character_, represents the meaning of a key. 787 // This value, together with character_, represents the meaning of a key.
788 // The value is DomKey::CHARACTER when the interpretation is a character. 788 // The value is DomKey::CHARACTER when the interpretation is a character.
789 // This, along with character_, is not necessarily initialized when the 789 // This, along with character_, is not necessarily initialized when the
790 // event is constructed; it may be set only if and when GetCharacter() 790 // event is constructed; it may be set only if and when GetCharacter()
791 // or GetDomKey() is called. 791 // or GetDomKey() is called.
792 mutable DomKey key_; 792 mutable DomKey key_;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 879
880 const GestureEventDetails& details() const { return details_; } 880 const GestureEventDetails& details() const { return details_; }
881 881
882 private: 882 private:
883 GestureEventDetails details_; 883 GestureEventDetails details_;
884 }; 884 };
885 885
886 } // namespace ui 886 } // namespace ui
887 887
888 #endif // UI_EVENTS_EVENT_H_ 888 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/events/event.cc » ('j') | ui/keyboard/keyboard_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698