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

Side by Side Diff: ui/wm/public/drag_drop_delegate.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 | « ui/wm/public/drag_drop_client.cc ('k') | ui/wm/public/drag_drop_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_WM_PUBLIC_DRAG_DROP_DELEGATE_H_
6 #define UI_WM_PUBLIC_DRAG_DROP_DELEGATE_H_
7
8 #include "ui/aura/aura_export.h"
9
10 namespace ui {
11 class DropTargetEvent;
12 }
13
14 namespace aura {
15 class Window;
16 namespace client {
17
18 // Delegate interface for drag and drop actions on aura::Window.
19 class AURA_EXPORT DragDropDelegate {
20 public:
21 // OnDragEntered is invoked when the mouse enters this window during a drag &
22 // drop session. This is immediately followed by an invocation of
23 // OnDragUpdated, and eventually one of OnDragExited or OnPerformDrop.
24 virtual void OnDragEntered(const ui::DropTargetEvent& event) = 0;
25
26 // Invoked during a drag and drop session while the mouse is over the window.
27 // This should return a bitmask of the DragDropTypes::DragOperation supported
28 // based on the location of the event. Return 0 to indicate the drop should
29 // not be accepted.
30 virtual int OnDragUpdated(const ui::DropTargetEvent& event) = 0;
31
32 // Invoked during a drag and drop session when the mouse exits the window, or
33 // when the drag session was canceled and the mouse was over the window.
34 virtual void OnDragExited() = 0;
35
36 // Invoked during a drag and drop session when OnDragUpdated returns a valid
37 // operation and the user release the mouse.
38 virtual int OnPerformDrop(const ui::DropTargetEvent& event) = 0;
39
40 protected:
41 virtual ~DragDropDelegate() {}
42 };
43
44 AURA_EXPORT void SetDragDropDelegate(Window* window,
45 DragDropDelegate* delegate);
46 AURA_EXPORT DragDropDelegate* GetDragDropDelegate(Window* window);
47
48 } // namespace client
49 } // namespace aura
50
51 #endif // UI_WM_PUBLIC_DRAG_DROP_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/wm/public/drag_drop_client.cc ('k') | ui/wm/public/drag_drop_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698