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_APP_WINDOW_NATIVE_WIDGET_MAC_H | 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_NATIVE_WIDGET_MAC_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_NATIVE_WIDGET_MAC_H | 6 #define CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_NATIVE_WIDGET_MAC_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/views/widget/native_widget_mac.h" | 9 #include "ui/views/widget/native_widget_mac.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 class NativeAppWindow; | 12 class NativeAppWindow; |
13 } | 13 } |
14 | 14 |
15 // This implements features specific to app windows, e.g. frameless windows that | 15 // This implements features specific to app windows, e.g. frameless windows that |
16 // behave like normal windows. | 16 // behave like normal windows. |
17 class AppWindowNativeWidgetMac : public views::NativeWidgetMac { | 17 class AppWindowNativeWidgetMac : public views::NativeWidgetMac { |
18 public: | 18 public: |
19 AppWindowNativeWidgetMac(views::Widget* widget, | 19 AppWindowNativeWidgetMac(views::Widget* widget, |
20 extensions::NativeAppWindow* native_app_window); | 20 extensions::NativeAppWindow* native_app_window); |
21 ~AppWindowNativeWidgetMac() override; | 21 ~AppWindowNativeWidgetMac() override; |
22 | 22 |
23 protected: | 23 protected: |
24 // NativeWidgetMac: | 24 // NativeWidgetMac: |
25 NativeWidgetMacNSWindow* CreateNSWindow( | 25 NativeWidgetMacNSWindow* CreateNSWindow( |
26 const views::Widget::InitParams& params) override; | 26 const views::Widget::InitParams& params) override; |
27 | 27 |
28 private: | 28 private: |
29 // Weak. Owned by extensions::AppWindow (which manages our Widget via its | 29 // Weak. Owned by extensions::AppWindow (which manages our Widget via its |
30 // WebContents). | 30 // WebContents). |
31 extensions::NativeAppWindow* native_app_window_; | 31 extensions::NativeAppWindow* native_app_window_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(AppWindowNativeWidgetMac); | 33 DISALLOW_COPY_AND_ASSIGN(AppWindowNativeWidgetMac); |
34 }; | 34 }; |
35 | 35 |
36 #endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_NATIVE_WIDGET_MAC_H | 36 #endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_NATIVE_WIDGET_MAC_H_ |
OLD | NEW |