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

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: more comments 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
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/test_utils.h
diff --git a/services/ui/ws/test_utils.h b/services/ui/ws/test_utils.h
index a5a7c90925802a45cc7a6a1acb2c21e5001de132..5a78a1b47d265384c52685c42b5f5cc43f1d5b38 100644
--- a/services/ui/ws/test_utils.h
+++ b/services/ui/ws/test_utils.h
@@ -15,6 +15,7 @@
#include "services/ui/public/interfaces/window_tree.mojom.h"
#include "services/ui/ws/display.h"
#include "services/ui/ws/display_binding.h"
+#include "services/ui/ws/drag_controller.h"
#include "services/ui/ws/event_dispatcher.h"
#include "services/ui/ws/platform_display.h"
#include "services/ui/ws/platform_display_factory.h"
@@ -217,6 +218,25 @@ class WindowManagerStateTestApi {
// -----------------------------------------------------------------------------
+class DragControllerTestApi {
+ public:
+ explicit DragControllerTestApi(DragController* op) : op_(op) {}
+ ~DragControllerTestApi() {}
+
+ size_t GetSizeOfQueueForWindow(ServerWindow* window) {
+ return op_->GetSizeOfQueueForWindow(window);
+ }
+
+ ServerWindow* GetCurrentTarget() { return op_->current_target_window_; }
+
+ private:
+ DragController* op_;
+
+ DISALLOW_COPY_AND_ASSIGN(DragControllerTestApi);
+};
+
+// -----------------------------------------------------------------------------
+
// Factory that always embeds the new WindowTree as the root user id.
class TestDisplayBinding : public DisplayBinding {
public:
@@ -411,6 +431,25 @@ 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 OnDragDropStart(
+ 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 OnCompleteDrop(uint32_t window,
+ uint32_t key_state,
+ const gfx::Point& position,
+ uint32_t effect_bitmask,
+ const OnCompleteDropCallback& callback) override;
+ void OnDragDropDone() override;
void OnChangeCompleted(uint32_t change_id, bool success) override;
void RequestClose(uint32_t window_id) override;
void GetWindowManager(
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698