| 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 namespace apps { |
| 12 class GlassAppWindowFrameView; |
| 13 } |
| 14 |
| 11 // Windows-specific parts of the views-backed native shell window implementation | 15 // Windows-specific parts of the views-backed native shell window implementation |
| 12 // for packaged apps. | 16 // for packaged apps. |
| 13 class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViews { | 17 class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViews { |
| 14 public: | 18 public: |
| 15 ChromeNativeAppWindowViewsWin(); | 19 ChromeNativeAppWindowViewsWin(); |
| 16 | 20 |
| 21 apps::GlassAppWindowFrameView* glass_frame_view() { |
| 22 return glass_frame_view_; |
| 23 }; |
| 24 |
| 17 private: | 25 private: |
| 18 void ActivateParentDesktopIfNecessary(); | 26 void ActivateParentDesktopIfNecessary(); |
| 19 | 27 |
| 20 void OnShortcutInfoLoaded( | 28 void OnShortcutInfoLoaded( |
| 21 const ShellIntegration::ShortcutInfo& shortcut_info); | 29 const ShellIntegration::ShortcutInfo& shortcut_info); |
| 22 | 30 |
| 23 HWND GetNativeAppWindowHWND() const; | 31 HWND GetNativeAppWindowHWND() const; |
| 24 | 32 |
| 25 // Overridden from ChromeNativeAppWindowViews: | 33 // Overridden from ChromeNativeAppWindowViews: |
| 26 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, | 34 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, |
| 27 views::Widget* widget) OVERRIDE; | 35 views::Widget* widget) OVERRIDE; |
| 28 virtual void InitializeDefaultWindow( | 36 virtual void InitializeDefaultWindow( |
| 29 const apps::AppWindow::CreateParams& create_params) OVERRIDE; | 37 const apps::AppWindow::CreateParams& create_params) OVERRIDE; |
| 38 virtual views::NonClientFrameView* CreateStandardAppWindowFrame() OVERRIDE; |
| 39 virtual apps::AppWindowFrameView* CreateNonStandardAppWindowFrame() OVERRIDE; |
| 30 | 40 |
| 31 // Overridden from ui::BaseWindow: | 41 // Overridden from ui::BaseWindow: |
| 32 virtual void Show() OVERRIDE; | 42 virtual void Show() OVERRIDE; |
| 33 virtual void Activate() OVERRIDE; | 43 virtual void Activate() OVERRIDE; |
| 34 | 44 |
| 35 // Overridden from apps::NativeAppWindow: | 45 // Overridden from apps::NativeAppWindow: |
| 36 virtual void UpdateShelfMenu() OVERRIDE; | 46 virtual void UpdateShelfMenu() OVERRIDE; |
| 37 | 47 |
| 38 base::WeakPtrFactory<ChromeNativeAppWindowViewsWin> weak_ptr_factory_; | 48 base::WeakPtrFactory<ChromeNativeAppWindowViewsWin> weak_ptr_factory_; |
| 39 | 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 apps::GlassAppWindowFrameView* glass_frame_view_; |
| 55 |
| 40 // The Windows Application User Model ID identifying the app. | 56 // The Windows Application User Model ID identifying the app. |
| 41 base::string16 app_model_id_; | 57 base::string16 app_model_id_; |
| 42 | 58 |
| 43 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin); | 59 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin); |
| 44 }; | 60 }; |
| 45 | 61 |
| 46 #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 |