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