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: components/mus/ws/window_manager_state.cc

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/ws/window_manager_state.cc
diff --git a/components/mus/ws/window_manager_state.cc b/components/mus/ws/window_manager_state.cc
index 8139b49a6d7fe4a01e87f7f18c4d1d2a129b52b4..1c31b8a01dadfcd931fcc31576343f3f5e406ee8 100644
--- a/components/mus/ws/window_manager_state.cc
+++ b/components/mus/ws/window_manager_state.cc
@@ -56,6 +56,12 @@ std::unique_ptr<ui::Event> CoalesceEvents(std::unique_ptr<ui::Event> first,
} // namespace
+struct WindowManagerState::CurrentMoveLoopState {
+ uint32_t change_id;
+ WindowId window_id;
+ gfx::Rect revert_bounds;
+};
+
class WindowManagerState::ProcessedEventTarget {
public:
ProcessedEventTarget(ServerWindow* window,
@@ -129,6 +135,35 @@ bool WindowManagerState::SetCapture(ServerWindow* window,
return event_dispatcher_.SetCaptureWindow(window, client_id);
}
+void WindowManagerState::StartMoveLoop(uint32_t change_id,
+ WindowId window_id,
+ const gfx::Rect& revert_bounds) {
+ current_move_loop_.reset(
+ new CurrentMoveLoopState{change_id, window_id, revert_bounds});
+}
+
+void WindowManagerState::EndMoveLoop() {
+ current_move_loop_.reset();
+}
+
+uint32_t WindowManagerState::GetCurrentMoveLoopChangeId() {
+ if (current_move_loop_)
+ return current_move_loop_->change_id;
+ return 0;
+}
+
+WindowId WindowManagerState::GetCurrentMoveLoopWindowId() {
+ if (current_move_loop_)
+ return current_move_loop_->window_id;
+ return WindowId();
+}
+
+gfx::Rect WindowManagerState::GetCurrentMoveLoopRevertBounds() {
+ if (current_move_loop_)
+ return current_move_loop_->revert_bounds;
+ return gfx::Rect();
+}
+
void WindowManagerState::ReleaseCaptureBlockedByModalWindow(
const ServerWindow* modal_window) {
event_dispatcher_.ReleaseCaptureBlockedByModalWindow(modal_window);

Powered by Google App Engine
This is Rietveld 408576698