| 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 58c60b659c0d06de71a6efbe08a2270a04c6c6d0..4a4acdefa6298d22295e548523ac62516c25969e 100644
|
| --- a/ui/views/cocoa/bridged_native_widget.h
|
| +++ b/ui/views/cocoa/bridged_native_widget.h
|
| @@ -67,6 +67,9 @@ class VIEWS_EXPORT BridgedNativeWidget
|
| static gfx::Size GetWindowSizeForClientSize(NSWindow* window,
|
| const gfx::Size& size);
|
|
|
| + // Whether an event monitor should be used to intercept window drag events.
|
| + static bool ShouldUseDragEventMonitor();
|
| +
|
| // Creates one side of the bridge. |parent| must not be NULL.
|
| explicit BridgedNativeWidget(NativeWidgetMac* parent);
|
| ~BridgedNativeWidget() override;
|
| @@ -151,11 +154,16 @@ class VIEWS_EXPORT BridgedNativeWidget
|
| // Called by the NSWindowDelegate when the window becomes or resigns key.
|
| void OnWindowKeyStatusChangedTo(bool is_key);
|
|
|
| - // Called by NSWindowDelegate when the application receives a mouse-down, but
|
| - // before the event is processed by NSWindows. Returning true here will cause
|
| - // the event to be cancelled and reposted at the CGSessionEventTap level. This
|
| - // is used to determine whether a mouse-down should drag the window.
|
| - virtual bool ShouldRepostPendingLeftMouseDown(NSPoint location_in_window);
|
| + // Returns true if the |event| should initiate a window drag.
|
| + bool ShouldDragWindow(NSEvent* event);
|
| +
|
| + // Called when the application receives a mouse-down, but before the event is
|
| + // processed by NSWindow. Returning true here will cause the event to be
|
| + // cancelled and reposted at the CGSessionEventTap level. This is used to
|
| + // determine whether a mouse-down should drag the window. Only called when
|
| + // ShouldUseDragEventMonitor() returns true.
|
| + // Virtual for testing.
|
| + virtual bool ShouldRepostPendingLeftMouseDown(NSEvent* event);
|
|
|
| // Called by NativeWidgetMac when the window size constraints change.
|
| void OnSizeConstraintsChanged();
|
|
|