OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AURA_EVENT_H_ | 5 #ifndef UI_AURA_EVENT_H_ |
6 #define UI_AURA_EVENT_H_ | 6 #define UI_AURA_EVENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 private: | 174 private: |
175 ui::KeyboardCode key_code_; | 175 ui::KeyboardCode key_code_; |
176 // True if this is a translated character event (vs. a raw key down). Both | 176 // True if this is a translated character event (vs. a raw key down). Both |
177 // share the same type: ui::ET_KEY_PRESSED. | 177 // share the same type: ui::ET_KEY_PRESSED. |
178 bool is_char_; | 178 bool is_char_; |
179 | 179 |
180 uint16 character_; | 180 uint16 character_; |
181 uint16 unmodified_character_; | 181 uint16 unmodified_character_; |
182 }; | 182 }; |
183 | 183 |
184 // A key event which is translated by an input method (IME). | |
185 // For example, if an IME receives a KeyEvent(ui::VKEY_SPACE), and it does not | |
186 // consume the key, the IME usually generates and dispatches a | |
187 // TranslatedKeyEvent(ui::VKEY_SPACE) event. If the IME receives a KeyEvent and | |
188 // it does consume the event, it might dispatch a | |
189 // TranslatedKeyEvent(ui::VKEY_PROCESSKEY) event as defined in the DOM spec. | |
190 class AURA_EXPORT TranslatedKeyEvent : public KeyEvent { | |
Ben Goodger (Google)
2011/12/14 15:30:21
Sorry, when I mentioned "different event type" wha
Yusuke Sato
2011/12/15 06:29:59
oh I see. I've modified the code as follows:
- Re
| |
191 public: | |
192 TranslatedKeyEvent(const base::NativeEvent& native_event, bool is_char); | |
193 | |
194 // Used for synthetic events such as a VKEY_PROCESSKEY key event. | |
195 TranslatedKeyEvent(ui::EventType type, | |
196 ui::KeyboardCode key_code, | |
197 int flags); | |
198 }; | |
199 | |
184 class AURA_EXPORT DropTargetEvent : public LocatedEvent { | 200 class AURA_EXPORT DropTargetEvent : public LocatedEvent { |
185 public: | 201 public: |
186 DropTargetEvent(const ui::OSExchangeData& data, | 202 DropTargetEvent(const ui::OSExchangeData& data, |
187 const gfx::Point& location, | 203 const gfx::Point& location, |
188 int source_operations) | 204 int source_operations) |
189 : LocatedEvent(ui::ET_DROP_TARGET_EVENT, location, 0), | 205 : LocatedEvent(ui::ET_DROP_TARGET_EVENT, location, 0), |
190 data_(data), | 206 data_(data), |
191 source_operations_(source_operations) { | 207 source_operations_(source_operations) { |
192 } | 208 } |
193 | 209 |
194 const ui::OSExchangeData& data() const { return data_; } | 210 const ui::OSExchangeData& data() const { return data_; } |
195 int source_operations() const { return source_operations_; } | 211 int source_operations() const { return source_operations_; } |
196 | 212 |
197 private: | 213 private: |
198 // Data associated with the drag/drop session. | 214 // Data associated with the drag/drop session. |
199 const ui::OSExchangeData& data_; | 215 const ui::OSExchangeData& data_; |
200 | 216 |
201 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. | 217 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. |
202 int source_operations_; | 218 int source_operations_; |
203 | 219 |
204 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); | 220 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
205 }; | 221 }; |
206 | 222 |
207 } // namespace aura | 223 } // namespace aura |
208 | 224 |
209 #endif // UI_AURA_EVENT_H_ | 225 #endif // UI_AURA_EVENT_H_ |
OLD | NEW |