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_ |