| 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 288b0c7ee8872b4a3411aa986f55dbcd2fb1426b..236605f7d0e55ef32b4e52ba2b3f57f3a7b967fb 100644
|
| --- a/ui/views/cocoa/bridged_native_widget.h
|
| +++ b/ui/views/cocoa/bridged_native_widget.h
|
| @@ -32,6 +32,7 @@ class BridgedNativeWidgetTestApi;
|
| }
|
|
|
| class CocoaMouseCapture;
|
| +class CocoaWindowMoveLoop;
|
| class NativeWidgetMac;
|
| class View;
|
|
|
| @@ -94,6 +95,11 @@ 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 escape.
|
| + 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;
|
| @@ -120,6 +126,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. Called for each mouse event during RunMoveLoop().
|
| + 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.
|
| @@ -176,6 +186,7 @@ class VIEWS_EXPORT BridgedNativeWidget
|
|
|
| private:
|
| friend class test::BridgedNativeWidgetTestApi;
|
| + friend class CocoaWindowMoveLoop;
|
|
|
| // Closes all child windows. BridgedNativeWidget children will be destroyed.
|
| void RemoveOrDestroyChildren();
|
| @@ -244,6 +255,7 @@ class VIEWS_EXPORT BridgedNativeWidget
|
| base::scoped_nsobject<BridgedContentView> bridged_view_;
|
| scoped_ptr<ui::InputMethod> input_method_;
|
| scoped_ptr<CocoaMouseCapture> mouse_capture_;
|
| + scoped_ptr<CocoaWindowMoveLoop> window_move_loop_;
|
| scoped_ptr<TooltipManager> tooltip_manager_;
|
| FocusManager* focus_manager_; // Weak. Owned by our Widget.
|
| Widget::InitParams::Type widget_type_;
|
| @@ -260,6 +272,8 @@ class VIEWS_EXPORT BridgedNativeWidget
|
| // has its own copy, but doesn't provide access to it).
|
| gfx::Rect bounds_before_fullscreen_;
|
|
|
| + base::RunLoop* drag_run_loop_ = nullptr;
|
| +
|
| // Whether this window wants to be fullscreen. If a fullscreen animation is in
|
| // progress then it might not be actually fullscreen.
|
| bool target_fullscreen_state_;
|
|
|