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

Side by Side Diff: services/ui/ws/drag_source.h

Issue 2349973010: mus drag and drop: return the completed effect to the caller. (Closed)
Patch Set: Rename some effect_taken to action_taken for consistency. Created 4 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
« no previous file with comments | « services/ui/ws/drag_controller_unittest.cc ('k') | services/ui/ws/test_utils.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_WS_DRAG_SOURCE_H_ 5 #ifndef SERVICES_UI_WS_DRAG_SOURCE_H_
6 #define SERVICES_UI_WS_DRAG_SOURCE_H_ 6 #define SERVICES_UI_WS_DRAG_SOURCE_H_
7 7
8 namespace ui { 8 namespace ui {
9 namespace ws { 9 namespace ws {
10 10
11 class DragTargetConnection; 11 class DragTargetConnection;
12 class ServerWindow; 12 class ServerWindow;
13 struct WindowId; 13 struct WindowId;
14 14
15 // An interface implemented by the object that caused a DragController to 15 // An interface implemented by the object that caused a DragController to
16 // exist, and which acts as a delegate to it. 16 // exist, and which acts as a delegate to it.
17 class DragSource { 17 class DragSource {
18 public: 18 public:
19 virtual ~DragSource() {} 19 virtual ~DragSource() {}
20 20
21 // Called when a drag operation is completed. |success| is true when a target 21 // Called when a drag operation is completed. |success| is true when a target
22 // window signaled the successful completion of the drag, false in all other 22 // window signaled the successful completion of the drag, false in all other
23 // cases where a drag was aborted at any step in the process. 23 // cases where a drag was aborted at any step in the process. |action_taken|
24 virtual void OnDragCompleted(bool success) = 0; 24 // is one of the kDropEffect constants in window_tree_constants.mojom.
25 virtual void OnDragCompleted(bool success, uint32_t action_taken) = 0;
25 26
26 virtual ServerWindow* GetWindowById(const WindowId& id) = 0; 27 virtual ServerWindow* GetWindowById(const WindowId& id) = 0;
27 28
28 // Returns the client connection that created |window|. 29 // Returns the client connection that created |window|.
29 virtual DragTargetConnection* GetDragTargetForWindow( 30 virtual DragTargetConnection* GetDragTargetForWindow(
30 const ServerWindow* window) = 0; 31 const ServerWindow* window) = 0;
31 }; 32 };
32 33
33 } // namespace ws 34 } // namespace ws
34 } // namespace ui 35 } // namespace ui
35 36
36 #endif // SERVICES_UI_WS_DRAG_SOURCE_H_ 37 #endif // SERVICES_UI_WS_DRAG_SOURCE_H_
OLDNEW
« no previous file with comments | « services/ui/ws/drag_controller_unittest.cc ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698