Index: services/ui/ws/event_dispatcher.h |
diff --git a/services/ui/ws/event_dispatcher.h b/services/ui/ws/event_dispatcher.h |
index aeeffd0a90a6b13ab0730e7c3815ce92c782877c..b410f58a05c5d4e8b548d93be8dc5ceba005220a 100644 |
--- a/services/ui/ws/event_dispatcher.h |
+++ b/services/ui/ws/event_dispatcher.h |
@@ -14,6 +14,7 @@ |
#include "base/macros.h" |
#include "services/ui/common/types.h" |
#include "services/ui/public/interfaces/event_matcher.mojom.h" |
+#include "services/ui/ws/current_drag_operation_delegate.h" |
#include "services/ui/ws/modal_window_controller.h" |
#include "services/ui/ws/server_window_observer.h" |
#include "ui/gfx/geometry/rect_f.h" |
@@ -26,15 +27,18 @@ class LocatedEvent; |
namespace ws { |
class Accelerator; |
+class CurrentDragOperation; |
class EventDispatcherDelegate; |
class ServerWindow; |
+class WindowTree; |
namespace test { |
class EventDispatcherTestApi; |
} |
// Handles dispatching events to the right location as well as updating focus. |
-class EventDispatcher : public ServerWindowObserver { |
+class EventDispatcher : public ServerWindowObserver, |
+ public CurrentDragOperationDelegate { |
public: |
enum class AcceleratorMatchPhase { |
// Both pre and post should be considered. |
@@ -75,6 +79,14 @@ class EventDispatcher : public ServerWindowObserver { |
return capture_window_client_id_; |
} |
+ // TODO(erg): Am I not supposed to pass window_tree here? |
+ void SetDragDropSourceWindow( |
sky
2016/08/24 00:08:57
I recommend having this take an interface rather t
|
+ uint32_t change_id, |
+ WindowTree* window_tree, |
+ ServerWindow* capture_window, |
+ mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data, |
+ uint32_t drag_operations); |
+ |
// Adds a system modal window. The window remains modal to system until it is |
// destroyed. There can exist multiple system modal windows, in which case the |
// one that is visible and added most recently or shown most recently would be |
@@ -117,6 +129,8 @@ class EventDispatcher : public ServerWindowObserver { |
// handled this is again called with an AcceleratorMatchPhase of POST_ONLY. |
void ProcessEvent(const ui::Event& event, AcceleratorMatchPhase match_phase); |
+ ServerWindow* FindDeepestVisibleWindowForEvents(gfx::Point* location); |
+ |
private: |
friend class test::EventDispatcherTestApi; |
@@ -202,8 +216,6 @@ class EventDispatcher : public ServerWindowObserver { |
Accelerator* FindAccelerator(const ui::KeyEvent& event, |
const ui::mojom::AcceleratorPhase phase); |
- ServerWindow* FindDeepestVisibleWindowForEvents(gfx::Point* location); |
- |
// ServerWindowObserver: |
void OnWillChangeWindowHierarchy(ServerWindow* window, |
ServerWindow* new_parent, |
@@ -211,11 +223,16 @@ class EventDispatcher : public ServerWindowObserver { |
void OnWindowVisibilityChanged(ServerWindow* window) override; |
void OnWindowDestroyed(ServerWindow* window) override; |
+ // CurrentDragOperationDelegate: |
+ void OnDragOver(bool success) override; |
+ |
EventDispatcherDelegate* delegate_; |
ServerWindow* capture_window_; |
ClientSpecificId capture_window_client_id_; |
+ std::unique_ptr<CurrentDragOperation> current_drag_drop_operation_; |
+ |
ModalWindowController modal_window_controller_; |
bool mouse_button_down_; |