Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / wm / public / drag_drop_client.h
blobe9989a58454a5c62c57a31ad9154444eb8abbb0f
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.
5 #ifndef UI_WM_PUBLIC_DRAG_DROP_CLIENT_H_
6 #define UI_WM_PUBLIC_DRAG_DROP_CLIENT_H_
8 #include "ui/aura/aura_export.h"
9 #include "ui/base/dragdrop/drag_drop_types.h"
10 #include "ui/gfx/native_widget_types.h"
12 namespace gfx {
13 class Point;
16 namespace ui {
17 class LocatedEvent;
18 class OSExchangeData;
21 namespace aura {
22 class Window;
23 namespace client {
25 // An interface implemented by an object that controls a drag and drop session.
26 class AURA_EXPORT DragDropClient {
27 public:
28 virtual ~DragDropClient() {}
30 // Initiates a drag and drop session. Returns the drag operation that was
31 // applied at the end of the drag drop session. |screen_location| is in
32 // screen coordinates.
33 virtual int StartDragAndDrop(const ui::OSExchangeData& data,
34 aura::Window* root_window,
35 aura::Window* source_window,
36 const gfx::Point& screen_location,
37 int operation,
38 ui::DragDropTypes::DragEventSource source) = 0;
40 // Called when mouse is dragged during a drag and drop.
41 virtual void DragUpdate(aura::Window* target,
42 const ui::LocatedEvent& event) = 0;
44 // Called when mouse is released during a drag and drop.
45 virtual void Drop(aura::Window* target,
46 const ui::LocatedEvent& event) = 0;
48 // Called when a drag and drop session is cancelled.
49 virtual void DragCancel() = 0;
51 // Returns true if a drag and drop session is in progress.
52 virtual bool IsDragDropInProgress() = 0;
55 AURA_EXPORT void SetDragDropClient(Window* root_window,
56 DragDropClient* client);
57 AURA_EXPORT DragDropClient* GetDragDropClient(Window* root_window);
59 } // namespace client
60 } // namespace aura
62 #endif // UI_WM_PUBLIC_DRAG_DROP_CLIENT_H_