Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: ui/events/event.h

Issue 23503086: Move DropTargetEvent back to ui/base for the time being as it depends on OSExchangeData which I don… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows bustage Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/dragdrop/drop_target_event.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EVENTS_EVENT_H_ 5 #ifndef UI_EVENTS_EVENT_H_
6 #define UI_EVENTS_EVENT_H_ 6 #define UI_EVENTS_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/event_types.h" 10 #include "base/event_types.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "ui/base/dragdrop/os_exchange_data.h"
14 #include "ui/base/gestures/gesture_types.h" 13 #include "ui/base/gestures/gesture_types.h"
15 #include "ui/events/event_constants.h" 14 #include "ui/events/event_constants.h"
16 #include "ui/events/keycodes/keyboard_codes.h" 15 #include "ui/events/keycodes/keyboard_codes.h"
17 #include "ui/events/latency_info.h" 16 #include "ui/events/latency_info.h"
18 #include "ui/gfx/point.h" 17 #include "ui/gfx/point.h"
19 18
20 namespace gfx { 19 namespace gfx {
21 class Transform; 20 class Transform;
22 } 21 }
23 22
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 TranslatedKeyEvent(bool is_press, KeyboardCode key_code, int flags); 591 TranslatedKeyEvent(bool is_press, KeyboardCode key_code, int flags);
593 592
594 // Changes the type() of the object from ET_TRANSLATED_KEY_* to ET_KEY_* so 593 // Changes the type() of the object from ET_TRANSLATED_KEY_* to ET_KEY_* so
595 // that RenderWidgetHostViewAura and NativeWidgetAura could handle the event. 594 // that RenderWidgetHostViewAura and NativeWidgetAura could handle the event.
596 void ConvertToKeyEvent(); 595 void ConvertToKeyEvent();
597 596
598 private: 597 private:
599 DISALLOW_COPY_AND_ASSIGN(TranslatedKeyEvent); 598 DISALLOW_COPY_AND_ASSIGN(TranslatedKeyEvent);
600 }; 599 };
601 600
602 class EVENTS_EXPORT DropTargetEvent : public LocatedEvent {
603 public:
604 DropTargetEvent(const OSExchangeData& data,
605 const gfx::Point& location,
606 const gfx::Point& root_location,
607 int source_operations);
608
609 const OSExchangeData& data() const { return data_; }
610 int source_operations() const { return source_operations_; }
611
612 private:
613 // Data associated with the drag/drop session.
614 const OSExchangeData& data_;
615
616 // Bitmask of supported DragDropTypes::DragOperation by the source.
617 int source_operations_;
618
619 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent);
620 };
621
622 class EVENTS_EXPORT ScrollEvent : public MouseEvent { 601 class EVENTS_EXPORT ScrollEvent : public MouseEvent {
623 public: 602 public:
624 explicit ScrollEvent(const base::NativeEvent& native_event); 603 explicit ScrollEvent(const base::NativeEvent& native_event);
625 template <class T> 604 template <class T>
626 ScrollEvent(const ScrollEvent& model, 605 ScrollEvent(const ScrollEvent& model,
627 T* source, 606 T* source,
628 T* target) 607 T* target)
629 : MouseEvent(model, source, target), 608 : MouseEvent(model, source, target),
630 x_offset_(model.x_offset_), 609 x_offset_(model.x_offset_),
631 y_offset_(model.y_offset_), 610 y_offset_(model.y_offset_),
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 // The set of indices of ones in the binary representation of 688 // The set of indices of ones in the binary representation of
710 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture. 689 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture.
711 // This value is stored as a bitfield because the number of touch ids varies, 690 // This value is stored as a bitfield because the number of touch ids varies,
712 // but we currently don't need more than 32 touches at a time. 691 // but we currently don't need more than 32 touches at a time.
713 const unsigned int touch_ids_bitfield_; 692 const unsigned int touch_ids_bitfield_;
714 }; 693 };
715 694
716 } // namespace ui 695 } // namespace ui
717 696
718 #endif // UI_EVENTS_EVENT_H_ 697 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/base/dragdrop/drop_target_event.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698