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

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

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stray mark Created 4 years, 3 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
Index: services/ui/ws/drag_target_connection.h
diff --git a/services/ui/ws/drag_target_connection.h b/services/ui/ws/drag_target_connection.h
new file mode 100644
index 0000000000000000000000000000000000000000..de122e4acddfaafcd923d1999977db30d497c476
--- /dev/null
+++ b/services/ui/ws/drag_target_connection.h
@@ -0,0 +1,60 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_UI_WS_DRAG_TARGET_CONNECTION_H_
+#define SERVICES_UI_WS_DRAG_TARGET_CONNECTION_H_
+
+#include "base/bind.h"
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/map.h"
+#include "mojo/public/cpp/bindings/string.h"
+#include "ui/gfx/geometry/point.h"
+
+namespace ui {
+namespace ws {
+
+class ServerWindow;
+
+// An abstract connection which can respond to drag/drop target requests.
+//
+// The methods in this class send drag and drop messages to the client and
+// return their results through the passed in callback.
+class DragTargetConnection {
+ public:
+ virtual ~DragTargetConnection() {}
+
+ virtual void PerformOnDragStart(
+ const ServerWindow* window,
+ mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) = 0;
+
+ virtual void PerformOnDragEnter(
+ const ServerWindow* window,
+ uint32_t key_state,
+ const gfx::Point& cursor_offset,
+ uint32_t effect_bitmask,
+ const base::Callback<void(uint32_t)>& callback) = 0;
+
+ virtual void PerformOnDragOver(
+ const ServerWindow* window,
+ uint32_t key_state,
+ const gfx::Point& cursor_offset,
+ uint32_t effect_bitmask,
+ const base::Callback<void(uint32_t)>& callback) = 0;
+
+ virtual void PerformOnDragLeave(const ServerWindow* window) = 0;
+
+ virtual void PerformOnDragDrop(
+ const ServerWindow* window,
+ uint32_t key_state,
+ const gfx::Point& cursor_offset,
+ uint32_t effect_bitmask,
+ const base::Callback<void(uint32_t)>& callback) = 0;
+
+ virtual void PerformOnDragFinish(const ServerWindow* window) = 0;
sky 2016/09/06 21:11:27 Document when this is sent. It isn't clear how it
+};
+
+} // namespace ws
+} // namespace ui
+
+#endif // SERVICES_UI_WS_DRAG_TARGET_CONNECTION_H_

Powered by Google App Engine
This is Rietveld 408576698