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

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: 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/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..3bea6a565c08ed5a43835af12f83b31a1b845dc1
--- /dev/null
+++ b/services/ui/public/cpp/window_drop_target.h
@@ -0,0 +1,43 @@
+// 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 void OnDragStart(
+ std::map<std::string, std::vector<uint8_t>> mime_data) = 0;
+
+ virtual uint32_t OnDragEnter(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;
+
+ virtual void OnDragFinish() = 0;
+};
+
+} // namespace ui
+
+#endif // SERVICES_UI_PUBLIC_CPP_WINDOW_DROP_TARGET_H_

Powered by Google App Engine
This is Rietveld 408576698