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