Chromium Code Reviews| 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 badda952339963177b0c5ded3ec992bb78f4d53e..68f81f5edc334fe047bfad82e5cf6af277917625 100644 |
| --- a/ui/views/cocoa/bridged_native_widget.h |
| +++ b/ui/views/cocoa/bridged_native_widget.h |
| @@ -29,6 +29,7 @@ class InputMethod; |
| namespace views { |
| class CocoaMouseCapture; |
| +class CocoaNonClientDrag; |
| class InputMethod; |
| class NativeWidgetMac; |
| class View; |
| @@ -132,6 +133,11 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate, |
| // Called by the NSWindowDelegate when the window becomes or resigns key. |
| void OnWindowKeyStatusChangedTo(bool is_key); |
| + // Called when the application receives a mouse-down, but before the event |
| + // is processed by NSWindows. Returning true here will cause the event to be |
| + // reposted. |
| + bool OnWindowWillReceiveLeftMouseDown(NSPoint location_in_window); |
| + |
| // Called by NativeWidgetMac when the window size constraints change. |
| void OnSizeConstraintsChanged(); |
| @@ -228,6 +234,7 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate, |
| base::scoped_nsobject<BridgedContentView> bridged_view_; |
| scoped_ptr<ui::InputMethod> input_method_; |
| scoped_ptr<CocoaMouseCapture> mouse_capture_; |
| + scoped_ptr<CocoaNonClientDrag> non_client_drag_; |
| FocusManager* focus_manager_; // Weak. Owned by our Widget. |
| Widget::InitParams::Type widget_type_; |
| @@ -259,6 +266,12 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate, |
| // currently hidden due to having a hidden parent. |
| bool wants_to_be_visible_; |
| + // Whether the window's content view is currently draggable. Initially true |
|
jackhou1
2015/05/20 05:50:36
This should initially be false, but we'd need to a
|
| + // because we make it non-draggable by adding a CocoaNonClientDragMaskView |
| + // to the content view. After that, this is only true while we're handling |
| + // a mouse-down that should drag the window. |
| + bool draggable_ = true; |
| + |
| DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); |
| }; |