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

Unified Diff: services/ui/public/cpp/window_drop_target.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
Index: services/ui/public/cpp/window_drop_target.h
diff --git a/services/ui/public/cpp/window_drop_target.h b/services/ui/public/cpp/window_drop_target.h
new file mode 100644
index 0000000000000000000000000000000000000000..dc06bb666b56f280c5b44308ca7ff846f881ff4e
--- /dev/null
+++ b/services/ui/public/cpp/window_drop_target.h
@@ -0,0 +1,40 @@
+// 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_PUBLIC_CPP_WINDOW_DROP_TARGET_H_
+#define SERVICES_UI_PUBLIC_CPP_WINDOW_DROP_TARGET_H_
+
+#include <map>
+#include <vector>
+
+#include "ui/gfx/geometry/point.h"
+
+namespace ui {
+
+// Interface that clients that want to opt-in to receiving drag drop events
+// pass to their mus::Window.
+class WindowDropTarget {
+ public:
+ virtual ~WindowDropTarget() {}
+
+ virtual uint32_t OnDragEnter(
+ std::map<std::string, std::vector<uint8_t>> mime_types,
+ uint32_t key_state,
+ const gfx::Point& position,
+ uint32_t effect_bitmask) = 0;
+
+ virtual uint32_t OnDragOver(uint32_t key_state,
+ const gfx::Point& position,
+ uint32_t effect_bitmask) = 0;
+
+ virtual void OnDragLeave() = 0;
+
+ virtual uint32_t OnDragDrop(uint32_t key_state,
+ const gfx::Point& position,
+ uint32_t effect_bitmask) = 0;
+};
+
+} // namespace ui
+
+#endif // SERVICES_UI_PUBLIC_CPP_WINDOW_DROP_TARGET_H_

Powered by Google App Engine
This is Rietveld 408576698