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

Unified Diff: chrome/browser/ui/views/apps/native_app_window_frame_view_mac.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: Change to single repost and [NSWindow setMovableByWindowBackground]. 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: chrome/browser/ui/views/apps/native_app_window_frame_view_mac.h
diff --git a/chrome/browser/ui/views/apps/native_app_window_frame_view_mac.h b/chrome/browser/ui/views/apps/native_app_window_frame_view_mac.h
index 0509f5caa66b6aad9ca4ba0b7aab4b1d07f15840..ee96b27ada937a844b5941b1f6ead92de83ebcb9 100644
--- a/chrome/browser/ui/views/apps/native_app_window_frame_view_mac.h
+++ b/chrome/browser/ui/views/apps/native_app_window_frame_view_mac.h
@@ -7,20 +7,30 @@
#include "ui/views/window/native_frame_view.h"
+namespace extensions {
+class NativeAppWindow;
+}
+
class Widget;
// Provides metrics consistent with a native frame on Mac. The actual frame is
// drawn by NSWindow.
class NativeAppWindowFrameViewMac : public views::NativeFrameView {
public:
- explicit NativeAppWindowFrameViewMac(views::Widget* frame);
+ NativeAppWindowFrameViewMac(views::Widget* frame,
+ extensions::NativeAppWindow* window);
~NativeAppWindowFrameViewMac() override;
// NonClientFrameView:
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override;
+ int NonClientHitTest(const gfx::Point& point) override;
private:
+ // Weak. Owned by extensions::AppWindow (which manages our Widget via its
+ // WebContents).
+ extensions::NativeAppWindow* native_app_window_;
+
DISALLOW_COPY_AND_ASSIGN(NativeAppWindowFrameViewMac);
};

Powered by Google App Engine
This is Rietveld 408576698