OLD | NEW |
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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 // TODO(msw): Additional work may be needed for analogues on other platforms. | 731 // TODO(msw): Additional work may be needed for analogues on other platforms. |
732 bool IsUnicodeKeyCode() const; | 732 bool IsUnicodeKeyCode() const; |
733 | 733 |
734 // Returns the DOM .code (physical key identifier) for a keystroke event. | 734 // Returns the DOM .code (physical key identifier) for a keystroke event. |
735 DomCode code() const { return code_; }; | 735 DomCode code() const { return code_; }; |
736 std::string GetCodeString() const; | 736 std::string GetCodeString() const; |
737 | 737 |
738 // Returns the DOM .key (layout meaning) for a keystroke event. | 738 // Returns the DOM .key (layout meaning) for a keystroke event. |
739 DomKey GetDomKey() const; | 739 DomKey GetDomKey() const; |
740 | 740 |
| 741 // Returns either DomKey or Unicode value + DomKey::CHARACTER. |
| 742 int GetDomKeyOrCharacter() const; |
| 743 |
741 // Normalizes flags_ so that it describes the state after the event. | 744 // Normalizes flags_ so that it describes the state after the event. |
742 // (Native X11 event flags describe the state before the event.) | 745 // (Native X11 event flags describe the state before the event.) |
743 void NormalizeFlags(); | 746 void NormalizeFlags(); |
744 | 747 |
745 protected: | 748 protected: |
746 friend class KeyEventTestApi; | 749 friend class KeyEventTestApi; |
747 | 750 |
748 // This allows a subclass TranslatedKeyEvent to be a non character event. | 751 // This allows a subclass TranslatedKeyEvent to be a non character event. |
749 void set_is_char(bool is_char) { is_char_ = is_char; } | 752 void set_is_char(bool is_char) { is_char_ = is_char; } |
750 | 753 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 | 874 |
872 const GestureEventDetails& details() const { return details_; } | 875 const GestureEventDetails& details() const { return details_; } |
873 | 876 |
874 private: | 877 private: |
875 GestureEventDetails details_; | 878 GestureEventDetails details_; |
876 }; | 879 }; |
877 | 880 |
878 } // namespace ui | 881 } // namespace ui |
879 | 882 |
880 #endif // UI_EVENTS_EVENT_H_ | 883 #endif // UI_EVENTS_EVENT_H_ |
OLD | NEW |