OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_LIB_MOJO_EXTENDED_KEY_EVENT_DATA_H
_ | 5 #ifndef MOJO_CONVERTERS_INPUT_EVENTS_MOJO_EXTENDED_KEY_EVENT_DATA_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_LIB_MOJO_EXTENDED_KEY_EVENT_DATA_H
_ | 6 #define MOJO_CONVERTERS_INPUT_EVENTS_MOJO_EXTENDED_KEY_EVENT_DATA_H_ |
7 | 7 |
| 8 #include "mojo/converters/input_events/mojo_input_events_export.h" |
8 #include "ui/events/event.h" | 9 #include "ui/events/event.h" |
9 #include "mojo/services/public/cpp/input_events/mojo_input_events_export.h" | |
10 | 10 |
11 namespace mojo { | 11 namespace mojo { |
12 | 12 |
13 // A structure to store all mojo specific data on a KeyEvent. | 13 // A structure to store all mojo specific data on a KeyEvent. |
14 class MOJO_INPUT_EVENTS_EXPORT MojoExtendedKeyEventData | 14 class MOJO_INPUT_EVENTS_EXPORT MojoExtendedKeyEventData |
15 : public ui::ExtendedKeyEventData { | 15 : public ui::ExtendedKeyEventData { |
16 public: | 16 public: |
17 MojoExtendedKeyEventData(int32_t windows_key_code, | 17 MojoExtendedKeyEventData(int32_t windows_key_code, |
18 uint16_t text, | 18 uint16_t text, |
19 uint16_t unmodified_text); | 19 uint16_t unmodified_text); |
20 virtual ~MojoExtendedKeyEventData(); | 20 virtual ~MojoExtendedKeyEventData(); |
21 | 21 |
22 int32_t windows_key_code() const { return windows_key_code_; } | 22 int32_t windows_key_code() const { return windows_key_code_; } |
23 uint16_t text() const { return text_; } | 23 uint16_t text() const { return text_; } |
24 uint16_t unmodified_text() const { return unmodified_text_; } | 24 uint16_t unmodified_text() const { return unmodified_text_; } |
25 | 25 |
26 // ui::ExtendedKeyEventData: | 26 // ui::ExtendedKeyEventData: |
27 virtual ui::ExtendedKeyEventData* Clone() const override; | 27 virtual ui::ExtendedKeyEventData* Clone() const override; |
28 | 28 |
29 private: | 29 private: |
30 const int32_t windows_key_code_; | 30 const int32_t windows_key_code_; |
31 const uint16_t text_; | 31 const uint16_t text_; |
32 const uint16_t unmodified_text_; | 32 const uint16_t unmodified_text_; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(MojoExtendedKeyEventData); | 34 DISALLOW_COPY_AND_ASSIGN(MojoExtendedKeyEventData); |
35 }; | 35 }; |
36 | 36 |
37 } // namespace mojo | 37 } // namespace mojo |
38 | 38 |
39 #endif // MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_LIB_MOJO_EXTENDED_KEY_EVENT_DAT
A_H_ | 39 #endif // MOJO_CONVERTERS_INPUT_EVENTS_MOJO_EXTENDED_KEY_EVENT_DATA_H_ |
OLD | NEW |