| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 | 803 |
| 804 // This allows a subclass TranslatedKeyEvent to be a non character event. | 804 // This allows a subclass TranslatedKeyEvent to be a non character event. |
| 805 void set_is_char(bool is_char) { is_char_ = is_char; } | 805 void set_is_char(bool is_char) { is_char_ = is_char; } |
| 806 | 806 |
| 807 private: | 807 private: |
| 808 // Determine key_ on a keystroke event from code_ and flags(). | 808 // Determine key_ on a keystroke event from code_ and flags(). |
| 809 void ApplyLayout() const; | 809 void ApplyLayout() const; |
| 810 | 810 |
| 811 KeyboardCode key_code_; | 811 KeyboardCode key_code_; |
| 812 | 812 |
| 813 // DOM KeyboardEvent |code| (e.g. DomCode::KEY_A, DomCode::SPACE). | 813 // DOM KeyboardEvent |code| (e.g. DomCode::US_A, DomCode::SPACE). |
| 814 // http://www.w3.org/TR/DOM-Level-3-Events-code/ | 814 // http://www.w3.org/TR/DOM-Level-3-Events-code/ |
| 815 // | 815 // |
| 816 // This value represents the physical position in the keyboard and can be | 816 // This value represents the physical position in the keyboard and can be |
| 817 // converted from / to keyboard scan code like XKB. | 817 // converted from / to keyboard scan code like XKB. |
| 818 DomCode code_; | 818 DomCode code_; |
| 819 | 819 |
| 820 // True if this is a character event, false if this is a keystroke event. | 820 // True if this is a character event, false if this is a keystroke event. |
| 821 bool is_char_ = false; | 821 bool is_char_ = false; |
| 822 | 822 |
| 823 // TODO(kpschoedel): refactor so that key_ is not mutable. | 823 // TODO(kpschoedel): refactor so that key_ is not mutable. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 | 914 |
| 915 const GestureEventDetails& details() const { return details_; } | 915 const GestureEventDetails& details() const { return details_; } |
| 916 | 916 |
| 917 private: | 917 private: |
| 918 GestureEventDetails details_; | 918 GestureEventDetails details_; |
| 919 }; | 919 }; |
| 920 | 920 |
| 921 } // namespace ui | 921 } // namespace ui |
| 922 | 922 |
| 923 #endif // UI_EVENTS_EVENT_H_ | 923 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |