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

Side by Side Diff: ui/aura/client/drag_drop_client.h

Issue 38423002: Make aura::clients take Window instead of RootWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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/aura/client/dispatcher_client.cc ('k') | ui/aura/client/drag_drop_client.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_AURA_CLIENT_DRAG_DROP_CLIENT_H_ 5 #ifndef UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_
6 #define UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ 6 #define UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_
7 7
8 #include "ui/aura/aura_export.h" 8 #include "ui/aura/aura_export.h"
9 #include "ui/base/dragdrop/drag_drop_types.h" 9 #include "ui/base/dragdrop/drag_drop_types.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 class Point; 13 class Point;
14 } 14 }
15 15
16 namespace ui { 16 namespace ui {
17 class LocatedEvent; 17 class LocatedEvent;
18 class OSExchangeData; 18 class OSExchangeData;
19 } 19 }
20 20
21 namespace aura { 21 namespace aura {
22 class RootWindow;
23 class Window; 22 class Window;
24 namespace client { 23 namespace client {
25 24
26 // An interface implemented by an object that controls a drag and drop session. 25 // An interface implemented by an object that controls a drag and drop session.
27 class AURA_EXPORT DragDropClient { 26 class AURA_EXPORT DragDropClient {
28 public: 27 public:
29 virtual ~DragDropClient() {} 28 virtual ~DragDropClient() {}
30 29
31 // Initiates a drag and drop session. Returns the drag operation that was 30 // Initiates a drag and drop session. Returns the drag operation that was
32 // applied at the end of the drag drop session. |root_location| is in the 31 // applied at the end of the drag drop session. |root_location| is in the
33 // RootWindow's coordinate system. 32 // root Window's coordinate system.
34 virtual int StartDragAndDrop(const ui::OSExchangeData& data, 33 virtual int StartDragAndDrop(const ui::OSExchangeData& data,
35 aura::RootWindow* root_window, 34 aura::Window* root_window,
36 aura::Window* source_window, 35 aura::Window* source_window,
37 const gfx::Point& root_location, 36 const gfx::Point& root_location,
38 int operation, 37 int operation,
39 ui::DragDropTypes::DragEventSource source) = 0; 38 ui::DragDropTypes::DragEventSource source) = 0;
40 39
41 // Called when mouse is dragged during a drag and drop. 40 // Called when mouse is dragged during a drag and drop.
42 virtual void DragUpdate(aura::Window* target, 41 virtual void DragUpdate(aura::Window* target,
43 const ui::LocatedEvent& event) = 0; 42 const ui::LocatedEvent& event) = 0;
44 43
45 // Called when mouse is released during a drag and drop. 44 // Called when mouse is released during a drag and drop.
46 virtual void Drop(aura::Window* target, 45 virtual void Drop(aura::Window* target,
47 const ui::LocatedEvent& event) = 0; 46 const ui::LocatedEvent& event) = 0;
48 47
49 // Called when a drag and drop session is cancelled. 48 // Called when a drag and drop session is cancelled.
50 virtual void DragCancel() = 0; 49 virtual void DragCancel() = 0;
51 50
52 // Returns true if a drag and drop session is in progress. 51 // Returns true if a drag and drop session is in progress.
53 virtual bool IsDragDropInProgress() = 0; 52 virtual bool IsDragDropInProgress() = 0;
54 }; 53 };
55 54
56 AURA_EXPORT void SetDragDropClient(RootWindow* root_window, 55 AURA_EXPORT void SetDragDropClient(Window* root_window,
57 DragDropClient* client); 56 DragDropClient* client);
58 AURA_EXPORT DragDropClient* GetDragDropClient(RootWindow* root_window); 57 AURA_EXPORT DragDropClient* GetDragDropClient(Window* root_window);
59 58
60 } // namespace client 59 } // namespace client
61 } // namespace aura 60 } // namespace aura
62 61
63 #endif // UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ 62 #endif // UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/aura/client/dispatcher_client.cc ('k') | ui/aura/client/drag_drop_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698