OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_FRAME_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_FRAME_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_FRAME_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_FRAME_VIEW_MAC_H_ |
7 | 7 |
8 #include "ui/views/window/native_frame_view.h" | 8 #include "ui/views/window/native_frame_view.h" |
9 | 9 |
| 10 namespace extensions { |
| 11 class NativeAppWindow; |
| 12 } |
| 13 |
10 class Widget; | 14 class Widget; |
11 | 15 |
12 // Provides metrics consistent with a native frame on Mac. The actual frame is | 16 // Provides metrics consistent with a native frame on Mac. The actual frame is |
13 // drawn by NSWindow. | 17 // drawn by NSWindow. |
14 class NativeAppWindowFrameViewMac : public views::NativeFrameView { | 18 class NativeAppWindowFrameViewMac : public views::NativeFrameView { |
15 public: | 19 public: |
16 explicit NativeAppWindowFrameViewMac(views::Widget* frame); | 20 NativeAppWindowFrameViewMac(views::Widget* frame, |
| 21 extensions::NativeAppWindow* window); |
17 ~NativeAppWindowFrameViewMac() override; | 22 ~NativeAppWindowFrameViewMac() override; |
18 | 23 |
19 // NonClientFrameView: | 24 // NonClientFrameView: |
20 gfx::Rect GetWindowBoundsForClientBounds( | 25 gfx::Rect GetWindowBoundsForClientBounds( |
21 const gfx::Rect& client_bounds) const override; | 26 const gfx::Rect& client_bounds) const override; |
| 27 int NonClientHitTest(const gfx::Point& point) override; |
22 | 28 |
23 private: | 29 private: |
| 30 // Weak. Owned by extensions::AppWindow (which manages our Widget via its |
| 31 // WebContents). |
| 32 extensions::NativeAppWindow* native_app_window_; |
| 33 |
24 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowFrameViewMac); | 34 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowFrameViewMac); |
25 }; | 35 }; |
26 | 36 |
27 #endif // CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_FRAME_VIEW_MAC_H_ | 37 #endif // CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_FRAME_VIEW_MAC_H_ |
OLD | NEW |