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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ui::KeyboardCode key_code() const { return key_code_; } | 154 ui::KeyboardCode key_code() const { return key_code_; } |
154 bool is_char() const { return is_char_; } | 155 bool is_char() const { return is_char_; } |
155 | 156 |
156 private: | 157 private: |
157 ui::KeyboardCode key_code_; | 158 ui::KeyboardCode key_code_; |
158 // True if this is a translated character event (vs. a raw key down). Both | 159 // True if this is a translated character event (vs. a raw key down). Both |
159 // share the same type: ui::ET_KEY_PRESSED. | 160 // share the same type: ui::ET_KEY_PRESSED. |
160 bool is_char_; | 161 bool is_char_; |
161 }; | 162 }; |
162 | 163 |
| 164 class AURA_EXPORT DropTargetEvent : public LocatedEvent { |
| 165 public: |
| 166 DropTargetEvent(const ui::OSExchangeData& data, |
| 167 const gfx::Point& location, |
| 168 int source_operations) |
| 169 : LocatedEvent(ui::ET_DROP_TARGET_EVENT, location, 0), |
| 170 data_(data), |
| 171 source_operations_(source_operations) { |
| 172 } |
| 173 |
| 174 const ui::OSExchangeData& data() const { return data_; } |
| 175 int source_operations() const { return source_operations_; } |
| 176 |
| 177 private: |
| 178 // Data associated with the drag/drop session. |
| 179 const ui::OSExchangeData& data_; |
| 180 |
| 181 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. |
| 182 int source_operations_; |
| 183 |
| 184 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
| 185 }; |
| 186 |
163 } // namespace aura | 187 } // namespace aura |
164 | 188 |
165 #endif // UI_AURA_EVENT_H_ | 189 #endif // UI_AURA_EVENT_H_ |
OLD | NEW |