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