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.h" |
9 | 9 |
10 namespace web_app { | 10 namespace web_app { |
11 struct ShortcutInfo; | 11 struct ShortcutInfo; |
12 } | 12 } |
13 | 13 |
| 14 class GlassAppWindowFrameViewWin; |
| 15 |
14 // Windows-specific parts of the views-backed native shell window implementation | 16 // Windows-specific parts of the views-backed native shell window implementation |
15 // for packaged apps. | 17 // for packaged apps. |
16 class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViews { | 18 class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViews { |
17 public: | 19 public: |
18 ChromeNativeAppWindowViewsWin(); | 20 ChromeNativeAppWindowViewsWin(); |
19 | 21 |
| 22 GlassAppWindowFrameViewWin* glass_frame_view() { |
| 23 return glass_frame_view_; |
| 24 }; |
| 25 |
20 private: | 26 private: |
21 void ActivateParentDesktopIfNecessary(); | 27 void ActivateParentDesktopIfNecessary(); |
22 | 28 |
23 void OnShortcutInfoLoaded( | 29 void OnShortcutInfoLoaded( |
24 const web_app::ShortcutInfo& shortcut_info); | 30 const web_app::ShortcutInfo& shortcut_info); |
25 | 31 |
26 HWND GetNativeAppWindowHWND() const; | 32 HWND GetNativeAppWindowHWND() const; |
27 | 33 |
28 // Overridden from ChromeNativeAppWindowViews: | 34 // Overridden from ChromeNativeAppWindowViews: |
29 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, | 35 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, |
30 views::Widget* widget) OVERRIDE; | 36 views::Widget* widget) OVERRIDE; |
31 virtual void InitializeDefaultWindow( | 37 virtual void InitializeDefaultWindow( |
32 const apps::AppWindow::CreateParams& create_params) OVERRIDE; | 38 const apps::AppWindow::CreateParams& create_params) OVERRIDE; |
| 39 virtual views::NonClientFrameView* CreateStandardDesktopAppFrame() OVERRIDE; |
33 | 40 |
34 // Overridden from ui::BaseWindow: | 41 // Overridden from ui::BaseWindow: |
35 virtual void Show() OVERRIDE; | 42 virtual void Show() OVERRIDE; |
36 virtual void Activate() OVERRIDE; | 43 virtual void Activate() OVERRIDE; |
37 | 44 |
38 // Overridden from apps::NativeAppWindow: | 45 // Overridden from apps::NativeAppWindow: |
39 virtual void UpdateShelfMenu() OVERRIDE; | 46 virtual void UpdateShelfMenu() OVERRIDE; |
40 | 47 |
41 base::WeakPtrFactory<ChromeNativeAppWindowViewsWin> weak_ptr_factory_; | 48 base::WeakPtrFactory<ChromeNativeAppWindowViewsWin> weak_ptr_factory_; |
42 | 49 |
| 50 // Populated if there is a glass frame, which provides special information |
| 51 // to the native widget implementation. This will be NULL if there is no |
| 52 // glass frame. Note, this can change from NULL to non-NULL and back again |
| 53 // throughout the life of a window, e.g. if DWM is enabled and disabled. |
| 54 GlassAppWindowFrameViewWin* glass_frame_view_; |
| 55 |
43 // The Windows Application User Model ID identifying the app. | 56 // The Windows Application User Model ID identifying the app. |
44 base::string16 app_model_id_; | 57 base::string16 app_model_id_; |
45 | 58 |
46 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin); | 59 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin); |
47 }; | 60 }; |
48 | 61 |
49 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_ |
OLD | NEW |