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

Unified Diff: services/ui/ws/event_dispatcher.h

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded for a few comments. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/default_access_policy.cc ('k') | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « services/ui/ws/default_access_policy.cc ('k') | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698