OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_MUS_DRAG_DROP_CLIENT_MUS_H_ |
| 6 #define UI_VIEWS_MUS_DRAG_DROP_CLIENT_MUS_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "ui/base/dragdrop/drag_drop_types.h" |
| 10 #include "ui/wm/public/drag_drop_client.h" |
| 11 |
| 12 namespace aura { |
| 13 class Window; |
| 14 } |
| 15 |
| 16 namespace ui { |
| 17 class LocatedEvent; |
| 18 class OSExchangeData; |
| 19 class Window; |
| 20 } |
| 21 |
| 22 namespace views { |
| 23 |
| 24 // An aura client object that translates aura dragging methods to their |
| 25 // remote ui::Window equivalents. |
| 26 class DragDropClientMus : public aura::client::DragDropClient { |
| 27 public: |
| 28 DragDropClientMus(ui::Window* ui_window); |
| 29 ~DragDropClientMus() override; |
| 30 |
| 31 // Overridden from aura::client::DragDropClient: |
| 32 int StartDragAndDrop(const ui::OSExchangeData& data, |
| 33 aura::Window* root_window, |
| 34 aura::Window* source_window, |
| 35 const gfx::Point& screen_location, |
| 36 int drag_operations, |
| 37 ui::DragDropTypes::DragEventSource source) override; |
| 38 void DragUpdate(aura::Window* target, const ui::LocatedEvent& event) override; |
| 39 void Drop(aura::Window* target, const ui::LocatedEvent& event) override; |
| 40 void DragCancel() override; |
| 41 bool IsDragDropInProgress() override; |
| 42 |
| 43 private: |
| 44 // Callback for StartDragAndDrop(). |
| 45 void OnMoveLoopEnd(bool* out_success, |
| 46 uint32_t* out_action, |
| 47 bool in_success, |
| 48 uint32_t in_action); |
| 49 |
| 50 ui::Window* ui_window_; |
| 51 |
| 52 base::Closure runloop_quit_closure_; |
| 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(DragDropClientMus); |
| 55 }; |
| 56 |
| 57 } // namespace views |
| 58 |
| 59 #endif // UI_VIEWS_MUS_DRAG_DROP_CLIENT_MUS_H_ |
OLD | NEW |