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

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

Issue 1146873002: [MacViews] Enable dragging a window by its caption/draggable areas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove CocoaNonClientDragMaskView, change BridgedContentView instead. Remove CGEventTap implementat… Created 5 years, 7 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
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..7eb8fbcd3abc56d484e86123b0705af9ff32ff85 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.
tapted 2015/05/20 07:18:15 Perhaps say why this exists here.
jackhou1 2015/05/22 02:49:16 Done.
+ bool OnWindowWillReceiveLeftMouseDown(NSPoint location_in_window);
tapted 2015/05/20 07:18:15 perhaps ShouldRepostPendingLeftMouseDown ?
jackhou1 2015/05/22 02:49:16 Done.
+
// 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_;

Powered by Google App Engine
This is Rietveld 408576698