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

Side by Side Diff: ui/events/android/drag_event_android.h

Issue 2896993002: Route OnDragEvent through ViewAndroid tree (Closed)
Patch Set: rebase Created 3 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_ANDROID_DRAG_EVENT_ANDROID_H_
6 #define UI_EVENTS_ANDROID_DRAG_EVENT_ANDROID_H_
7
8 #include "ui/events/event.h"
9 #include "ui/events/events_export.h"
10
11 namespace gfx {
12 class Point;
13 }
14
15 namespace ui {
16
17 // Implementation of ui::LocatedEvent wrapping a native Android DragEvent.
18 // All coordinates are in DIPs.
19 class EVENTS_EXPORT DragEventAndroid : public LocatedEvent {
20 public:
21 DragEventAndroid(int action,
22 const gfx::PointF& location,
23 const gfx::PointF& screen_location,
24 const std::vector<base::string16>& mime_types,
25 const base::string16& content);
26 int action() const { return action_; }
27 const std::vector<base::string16>& mime_types() const { return mime_types_; }
28 const base::string16& content() const { return content_; }
29
30 // Creates a new DragEventAndroid instance different from |this| only by
31 // its location.
32 std::unique_ptr<DragEventAndroid> CreateFor(const gfx::Point& location) const;
33
34 private:
35 int action_;
36 const std::vector<base::string16>& mime_types_;
37 const base::string16& content_;
38
39 DISALLOW_COPY_AND_ASSIGN(DragEventAndroid);
40 };
41
42 } // namespace ui
43
44 #endif // UI_EVENTS_ANDROID_DRAG_EVENT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698