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

Unified Diff: components/mus/public/cpp/window_tree_client.h

Issue 2060513002: Tab dragging as implemented as a mus API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use not not pattern to fix win compile Created 4 years, 6 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: components/mus/public/cpp/window_tree_client.h
diff --git a/components/mus/public/cpp/window_tree_client.h b/components/mus/public/cpp/window_tree_client.h
index f22e3840632a793f7da52bac3f3456784cf59587..b588d72158a56a9dd47b4fdb1d266faa04399984 100644
--- a/components/mus/public/cpp/window_tree_client.h
+++ b/components/mus/public/cpp/window_tree_client.h
@@ -180,6 +180,15 @@ class WindowTreeClient : public mojom::WindowTreeClient,
// will be ignored.
void SetEventObserver(mojom::EventMatcherPtr matcher);
+ // Performs a window move. This call blocks but spins up a nested message
+ // loop to handle incoming move messages.
+ void PerformWindowMove(Window* window, const gfx::Point& cursor_location,
sky 2016/06/24 19:59:00 nit: run git cl format
+ const base::Callback<void(bool)>& callback);
+
+ // Cancels a in progress window move. (If no window is currently being moved,
+ // does nothing.)
+ void CancelWindowMove(Window* window);
+
// Creates and returns a new Window (which is owned by the window server).
// Windows are initially hidden, use SetVisible(true) to show.
Window* NewWindow() { return NewWindow(nullptr); }
@@ -299,6 +308,7 @@ class WindowTreeClient : public mojom::WindowTreeClient,
void OnWindowPredefinedCursorChanged(Id window_id,
mojom::Cursor cursor) override;
void OnChangeCompleted(uint32_t change_id, bool success) override;
+ void OnMoveLoopCompleted(uint32_t change_id, bool success) override;
void RequestClose(uint32_t window_id) override;
void GetWindowManager(
mojo::AssociatedInterfaceRequest<WindowManager> internal) override;
@@ -321,6 +331,10 @@ class WindowTreeClient : public mojom::WindowTreeClient,
transport_properties) override;
void WmClientJankinessChanged(ClientSpecificId client_id,
bool janky) override;
+ void WmPerformMoveLoop(uint32_t change_id,
+ Id window_id,
+ const gfx::Point& cursor_location) override;
+ void WmCancelMoveLoop(uint32_t window_id) override;
void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override;
// Overridden from WindowManagerClient:
@@ -339,6 +353,8 @@ class WindowTreeClient : public mojom::WindowTreeClient,
Window* window,
const gfx::Vector2d& offset,
const gfx::Insets& hit_area) override;
+ void OnWmMoveLoopCompleted(uint32_t change_id,
+ bool completed) override;
// The one int in |cursor_location_mapping_|. When we read from this
// location, we must always read from it atomically.
@@ -396,6 +412,10 @@ class WindowTreeClient : public mojom::WindowTreeClient,
// Monotonically increasing ID for event observers.
uint32_t event_observer_id_ = 0u;
+ // Callback executed when a move loop initiated by PerformWindowMove() is
+ // completed.
+ base::Callback<void(bool)> on_current_move_finished_;
+
base::WeakPtrFactory<WindowTreeClient> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WindowTreeClient);

Powered by Google App Engine
This is Rietveld 408576698