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