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

Unified Diff: services/ui/ws/test_utils.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/test_utils.h
diff --git a/services/ui/ws/test_utils.h b/services/ui/ws/test_utils.h
index 5aa74cc3cc48d73d8e60dc605edc3b8bf64c2231..8c4fd770d450bab0a131e98dda71806dc732398a 100644
--- a/services/ui/ws/test_utils.h
+++ b/services/ui/ws/test_utils.h
@@ -13,6 +13,7 @@
#include "base/message_loop/message_loop.h"
#include "services/ui/public/interfaces/display.mojom.h"
#include "services/ui/public/interfaces/window_tree.mojom.h"
+#include "services/ui/ws/current_drag_operation.h"
#include "services/ui/ws/display.h"
#include "services/ui/ws/display_binding.h"
#include "services/ui/ws/event_dispatcher.h"
@@ -217,6 +218,25 @@ class WindowManagerStateTestApi {
// -----------------------------------------------------------------------------
+class CurrentDragOperationTestApi {
+ public:
+ explicit CurrentDragOperationTestApi(CurrentDragOperation* op) : op_(op) {}
+ ~CurrentDragOperationTestApi() {}
+
+ size_t GetSizeOfQueueForWindow(ServerWindow* window) {
+ return op_->GetSizeOfQueueForWindow(window);
+ }
+
+ ServerWindow* GetCurrentTarget() { return op_->current_target_window_; }
+
+ private:
+ CurrentDragOperation* op_;
+
+ DISALLOW_COPY_AND_ASSIGN(CurrentDragOperationTestApi);
+};
+
+// -----------------------------------------------------------------------------
+
// Factory that always embeds the new WindowTree as the root user id.
class TestDisplayBinding : public DisplayBinding {
public:
@@ -411,6 +431,26 @@ class TestWindowTreeClient : public ui::mojom::WindowTreeClient {
void OnWindowFocused(uint32_t focused_window_id) override;
void OnWindowPredefinedCursorChanged(uint32_t window_id,
mojom::Cursor cursor_id) override;
+ void OnDragStart(
+ Id window_id,
+ mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) override;
+ void OnDragEnter(uint32_t window,
+ uint32_t key_state,
+ const gfx::Point& position,
+ uint32_t effect_bitmask,
+ const OnDragEnterCallback& callback) override;
+ void OnDragOver(uint32_t window,
+ uint32_t key_state,
+ const gfx::Point& position,
+ uint32_t effect_bitmask,
+ const OnDragOverCallback& callback) override;
+ void OnDragLeave(uint32_t window) override;
+ void OnDragDrop(uint32_t window,
+ uint32_t key_state,
+ const gfx::Point& position,
+ uint32_t effect_bitmask,
+ const OnDragDropCallback& callback) override;
+ void OnDragFinish(Id window_id) override;
void OnChangeCompleted(uint32_t change_id, bool success) override;
void RequestClose(uint32_t window_id) override;
void GetWindowManager(

Powered by Google App Engine
This is Rietveld 408576698