OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ |
7 | 7 |
8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" | 8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h" |
9 | 9 |
10 namespace web_app { | 10 namespace web_app { |
11 struct ShortcutInfo; | 11 struct ShortcutInfo; |
12 } | 12 } |
13 | 13 |
14 class GlassAppWindowFrameViewWin; | 14 class GlassAppWindowFrameViewWin; |
15 | 15 |
16 // Windows-specific parts of the views-backed native shell window implementation | 16 // Windows-specific parts of the views-backed native shell window implementation |
17 // for packaged apps. | 17 // for packaged apps. |
18 class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViews { | 18 class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViewsAura { |
19 public: | 19 public: |
20 ChromeNativeAppWindowViewsWin(); | 20 ChromeNativeAppWindowViewsWin(); |
21 | 21 |
22 GlassAppWindowFrameViewWin* glass_frame_view() { | 22 GlassAppWindowFrameViewWin* glass_frame_view() { |
23 return glass_frame_view_; | 23 return glass_frame_view_; |
24 } | 24 } |
25 | 25 |
26 private: | 26 private: |
27 void ActivateParentDesktopIfNecessary(); | 27 void ActivateParentDesktopIfNecessary(); |
28 | 28 |
29 void OnShortcutInfoLoaded( | 29 void OnShortcutInfoLoaded( |
30 const web_app::ShortcutInfo& shortcut_info); | 30 const web_app::ShortcutInfo& shortcut_info); |
31 | 31 |
32 HWND GetNativeAppWindowHWND() const; | 32 HWND GetNativeAppWindowHWND() const; |
33 bool IsRunningInAsh(); | 33 bool IsRunningInAsh(); |
34 void EnsureCaptionStyleSet(); | 34 void EnsureCaptionStyleSet(); |
35 | 35 |
36 // Overridden from ChromeNativeAppWindowViews: | 36 // Overridden from ChromeNativeAppWindowViews: |
37 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, | 37 virtual void OnBeforeWidgetInit( |
38 views::Widget* widget) override; | 38 const extensions::AppWindow::CreateParams& create_params, |
| 39 views::Widget::InitParams* init_params, |
| 40 views::Widget* widget) override; |
39 virtual void InitializeDefaultWindow( | 41 virtual void InitializeDefaultWindow( |
40 const extensions::AppWindow::CreateParams& create_params) override; | 42 const extensions::AppWindow::CreateParams& create_params) override; |
41 virtual views::NonClientFrameView* CreateStandardDesktopAppFrame() override; | 43 virtual views::NonClientFrameView* CreateStandardDesktopAppFrame() override; |
42 | 44 |
43 // Overridden from ui::BaseWindow: | 45 // Overridden from ui::BaseWindow: |
44 virtual void Show() override; | 46 virtual void Show() override; |
45 virtual void Activate() override; | 47 virtual void Activate() override; |
46 | 48 |
47 // Overridden from views::WidgetDelegate: | 49 // Overridden from views::WidgetDelegate: |
48 bool CanMinimize() const override; | 50 bool CanMinimize() const override; |
(...skipping 13 matching lines...) Expand all Loading... |
62 | 64 |
63 // Whether the InitParams indicated that this window should be translucent. | 65 // Whether the InitParams indicated that this window should be translucent. |
64 bool is_translucent_; | 66 bool is_translucent_; |
65 | 67 |
66 base::WeakPtrFactory<ChromeNativeAppWindowViewsWin> weak_ptr_factory_; | 68 base::WeakPtrFactory<ChromeNativeAppWindowViewsWin> weak_ptr_factory_; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin); | 70 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin); |
69 }; | 71 }; |
70 | 72 |
71 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ | 73 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ |
OLD | NEW |