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

Unified Diff: ash/mus/frame/move_event_handler.h

Issue 2099513003: mus: Use the new drag API to implement tab dragging in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dragging-part-1
Patch Set: Rebase to tot Created 4 years, 5 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 | « no previous file | ash/mus/frame/move_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/frame/move_event_handler.h
diff --git a/ash/mus/frame/move_event_handler.h b/ash/mus/frame/move_event_handler.h
index 7b4b0a2030422952f26b7fb6f08bd1e2c0cfa072..d94f1eaf724f11597ae76675e797fb6ba6c89c85 100644
--- a/ash/mus/frame/move_event_handler.h
+++ b/ash/mus/frame/move_event_handler.h
@@ -36,6 +36,25 @@ class MoveEventHandler : public ui::EventHandler, public aura::WindowObserver {
aura::Window* aura_window);
~MoveEventHandler() override;
+ // Retrieves the MoveEventHandler for an existing WmWindow.
+ static MoveEventHandler* GetForWindow(WmWindow* wm_window);
+
+ // Attempts to start a drag if one is not already in progress. This passes
+ // the call to the underlying WmToplevelWindowEventHandler. After the drag
+ // completes, |end_closure| will be called to return whether the drag was
+ // successfully completed.
+ void AttemptToStartDrag(
+ const gfx::Point& point_in_parent,
+ int window_component,
+ aura::client::WindowMoveSource source,
+ const base::Callback<void(bool success)>& end_closure);
+
+ // Returns whether we're in a drag.
+ bool IsDragInProgress();
+
+ // Reverts a manually started drag started with AttemptToStartDrag().
+ void RevertDrag();
+
private:
// Removes observer and EventHandler installed on |root_window_|.
void Detach();
« no previous file with comments | « no previous file | ash/mus/frame/move_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698