Chromium Code Reviews| Index: services/ui/public/cpp/window.h |
| diff --git a/services/ui/public/cpp/window.h b/services/ui/public/cpp/window.h |
| index fc5efd9eb419511e94ebba6c6767a080399af3c9..955902d090b984d14eb09c1c673b7c3aaad5c2f6 100644 |
| --- a/services/ui/public/cpp/window.h |
| +++ b/services/ui/public/cpp/window.h |
| @@ -30,6 +30,7 @@ class ServiceProviderImpl; |
| class WindowObserver; |
| class WindowSurface; |
| class WindowSurfaceBinding; |
| +class WindowDropTarget; |
| class WindowTreeClient; |
| class WindowTreeClientPrivate; |
| @@ -209,6 +210,11 @@ class Window { |
| bool HasFocus() const; |
| void SetCanFocus(bool can_focus); |
| + // Sets whether this window accepts drags. Passing a non-null |drop_target| |
| + // will enable acceptance of drops. Passing null will disable it. |
| + void SetCanAcceptDrops(WindowDropTarget* drop_target); |
| + WindowDropTarget* drop_target() const { return drop_target_; } |
|
sky
2016/09/13 18:15:31
Either return const here, or remove const from sig
|
| + |
| // Sets whether this window accepts events. |
| void SetCanAcceptEvents(bool can_accept_events); |
| @@ -225,6 +231,15 @@ class Window { |
| // to a better place. |
| void RequestClose(); |
| + // Starts an inter-process drag and drop operation. |
| + void PerformDragDrop( |
| + int drag_pointer, |
| + const std::map<std::string, std::vector<uint8_t>>& drag_data, |
| + int drag_operation, |
| + const gfx::Point& cursor_location, |
| + const SkBitmap& bitmap, |
| + const base::Callback<void(bool)>& callback); |
| + |
| // Tells the window manager to take control of moving the window. Returns |
| // true if the move wasn't canceled. |
| void PerformWindowMove(mojom::MoveLoopSource source, |
| @@ -342,6 +357,10 @@ class Window { |
| float opacity_; |
| int64_t display_id_; |
| + // The client supplied delegate that receives drag events for this |
| + // window (weak ptr). |
| + WindowDropTarget* drop_target_ = nullptr; |
| + |
| // Whether this window can accept events. Initialized to true to |
| // match ServerWindow. |
| bool can_accept_events_ = true; |