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

Side by Side Diff: ui/views/widget/drop_helper.h

Issue 2323553002: mash: Use the new mus drag and drop API to get drag working in mash. (Closed)
Patch Set: Patch cleanup Created 4 years, 2 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
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_VIEWS_WIDGET_DROP_HELPER_H_ 5 #ifndef UI_VIEWS_WIDGET_DROP_HELPER_H_
6 #define UI_VIEWS_WIDGET_DROP_HELPER_H_ 6 #define UI_VIEWS_WIDGET_DROP_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 #include "ui/views/views_export.h"
11
10 namespace gfx { 12 namespace gfx {
11 class Point; 13 class Point;
12 } // namespace gfx 14 } // namespace gfx
13 15
14 namespace ui { 16 namespace ui {
15 class OSExchangeData; 17 class OSExchangeData;
16 } // namespace ui 18 } // namespace ui
17 using ui::OSExchangeData; 19 using ui::OSExchangeData;
18 20
19 namespace views { 21 namespace views {
20 22
21 class RootView; 23 class RootView;
22 class View; 24 class View;
23 25
24 // DropHelper provides support for managing the view a drop is going to occur 26 // DropHelper provides support for managing the view a drop is going to occur
25 // at during dnd as well as sending the view the appropriate dnd methods. 27 // at during dnd as well as sending the view the appropriate dnd methods.
26 // DropHelper is intended to be used by a class that interacts with the system 28 // DropHelper is intended to be used by a class that interacts with the system
27 // drag and drop. The system class invokes OnDragOver as the mouse moves, 29 // drag and drop. The system class invokes OnDragOver as the mouse moves,
28 // then either OnDragExit or OnDrop when the drop is done. 30 // then either OnDragExit or OnDrop when the drop is done.
29 class DropHelper { 31 class VIEWS_EXPORT DropHelper {
30 public: 32 public:
31 explicit DropHelper(View* root_view); 33 explicit DropHelper(View* root_view);
32 ~DropHelper(); 34 ~DropHelper();
33 35
34 // Current view drop events are targeted at, may be NULL. 36 // Current view drop events are targeted at, may be NULL.
35 View* target_view() const { return target_view_; } 37 View* target_view() const { return target_view_; }
36 38
37 // Returns the RootView the DropHelper was created with. 39 // Returns the RootView the DropHelper was created with.
38 View* root_view() const { return root_view_; } 40 View* root_view() const { return root_view_; }
39 41
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 100
99 // The deepest view under the current drop coordinate. 101 // The deepest view under the current drop coordinate.
100 View* deepest_view_; 102 View* deepest_view_;
101 103
102 DISALLOW_COPY_AND_ASSIGN(DropHelper); 104 DISALLOW_COPY_AND_ASSIGN(DropHelper);
103 }; 105 };
104 106
105 } // namespace views 107 } // namespace views
106 108
107 #endif // UI_VIEWS_WIDGET_DROP_HELPER_H_ 109 #endif // UI_VIEWS_WIDGET_DROP_HELPER_H_
OLDNEW
« ui/views/mus/native_widget_mus.cc ('K') | « ui/views/mus/os_exchange_data_provider_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698