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

Unified Diff: ui/views/cocoa/bridged_native_widget.h

Issue 1747803003: MacViews: Implement Tab Dragging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix include. 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
« no previous file with comments | « ui/base/test/ui_controls_mac.mm ('k') | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_native_widget.h
diff --git a/ui/views/cocoa/bridged_native_widget.h b/ui/views/cocoa/bridged_native_widget.h
index 1b2607cf94d146acef27a193d419b849d488c171..adbe281c943dfca41c0a677bf1a20242cde1c9ce 100644
--- a/ui/views/cocoa/bridged_native_widget.h
+++ b/ui/views/cocoa/bridged_native_widget.h
@@ -34,6 +34,7 @@ class BridgedNativeWidgetTestApi;
}
class CocoaMouseCapture;
+class CocoaWindowMoveLoop;
class DragDropClientMac;
class NativeWidgetMac;
class View;
@@ -100,6 +101,12 @@ class VIEWS_EXPORT BridgedNativeWidget
void ReleaseCapture();
bool HasCapture();
+ // Start moving the window, pinned to the mouse cursor, and monitor events.
+ // Return MOVE_LOOP_SUCCESSFUL on mouse up or MOVE_LOOP_CANCELED on premature
+ // termination via EndMoveLoop() or when window is destroyed during the drag.
+ Widget::MoveLoopResult RunMoveLoop(const gfx::Vector2d& drag_offset);
+ void EndMoveLoop();
+
// See views::Widget.
void SetNativeWindowProperty(const char* key, void* value);
void* GetNativeWindowProperty(const char* key) const;
@@ -126,6 +133,10 @@ class VIEWS_EXPORT BridgedNativeWidget
// Called by the NSWindowDelegate when the size of the window changes.
void OnSizeChanged();
+ // Called once by the NSWindowDelegate when the position of the window has
+ // changed.
+ void OnPositionChanged();
+
// Called by the NSWindowDelegate when the visibility of the window may have
// changed. For example, due to a (de)miniaturize operation, or the window
// being reordered in (or out of) the screen list.
@@ -265,6 +276,7 @@ class VIEWS_EXPORT BridgedNativeWidget
base::scoped_nsobject<BridgedContentView> bridged_view_;
std::unique_ptr<ui::InputMethod> input_method_;
std::unique_ptr<CocoaMouseCapture> mouse_capture_;
+ std::unique_ptr<CocoaWindowMoveLoop> window_move_loop_;
std::unique_ptr<TooltipManager> tooltip_manager_;
std::unique_ptr<DragDropClientMac> drag_drop_client_;
FocusManager* focus_manager_; // Weak. Owned by our Widget.
« no previous file with comments | « ui/base/test/ui_controls_mac.mm ('k') | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698