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" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "ui/aura/aura_export.h" | 12 #include "ui/aura/aura_export.h" |
| 13 #include "ui/base/dragdrop/os_exchange_data.h" |
13 #include "ui/base/events.h" | 14 #include "ui/base/events.h" |
14 #include "ui/base/keycodes/keyboard_codes.h" | 15 #include "ui/base/keycodes/keyboard_codes.h" |
15 #include "ui/gfx/point.h" | 16 #include "ui/gfx/point.h" |
16 | 17 |
17 namespace ui { | 18 namespace ui { |
18 class Transform; | 19 class Transform; |
19 } | 20 } |
20 | 21 |
21 namespace aura { | 22 namespace aura { |
22 | 23 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 private: | 174 private: |
174 ui::KeyboardCode key_code_; | 175 ui::KeyboardCode key_code_; |
175 // 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 |
176 // share the same type: ui::ET_KEY_PRESSED. | 177 // share the same type: ui::ET_KEY_PRESSED. |
177 bool is_char_; | 178 bool is_char_; |
178 | 179 |
179 uint16 character_; | 180 uint16 character_; |
180 uint16 unmodified_character_; | 181 uint16 unmodified_character_; |
181 }; | 182 }; |
182 | 183 |
| 184 class AURA_EXPORT DropTargetEvent : public LocatedEvent { |
| 185 public: |
| 186 DropTargetEvent(const ui::OSExchangeData& data, |
| 187 const gfx::Point& location, |
| 188 int source_operations) |
| 189 : LocatedEvent(ui::ET_DROP_TARGET_EVENT, location, 0), |
| 190 data_(data), |
| 191 source_operations_(source_operations) { |
| 192 } |
| 193 |
| 194 const ui::OSExchangeData& data() const { return data_; } |
| 195 int source_operations() const { return source_operations_; } |
| 196 |
| 197 private: |
| 198 // Data associated with the drag/drop session. |
| 199 const ui::OSExchangeData& data_; |
| 200 |
| 201 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. |
| 202 int source_operations_; |
| 203 |
| 204 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
| 205 }; |
| 206 |
183 } // namespace aura | 207 } // namespace aura |
184 | 208 |
185 #endif // UI_AURA_EVENT_H_ | 209 #endif // UI_AURA_EVENT_H_ |
OLD | NEW |