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
3 // found in the LICENSE file.
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_
8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
14 class GlassAppWindowFrameViewWin
;
16 // Windows-specific parts of the views-backed native shell window implementation
18 class ChromeNativeAppWindowViewsWin
: public ChromeNativeAppWindowViews
{
20 ChromeNativeAppWindowViewsWin();
22 GlassAppWindowFrameViewWin
* glass_frame_view() {
23 return glass_frame_view_
;
27 void ActivateParentDesktopIfNecessary();
29 void OnShortcutInfoLoaded(
30 const web_app::ShortcutInfo
& shortcut_info
);
32 HWND
GetNativeAppWindowHWND() const;
33 void EnsureCaptionStyleSet();
35 // Overridden from ChromeNativeAppWindowViews:
36 virtual void OnBeforeWidgetInit(views::Widget::InitParams
* init_params
,
37 views::Widget
* widget
) OVERRIDE
;
38 virtual void InitializeDefaultWindow(
39 const apps::AppWindow::CreateParams
& create_params
) OVERRIDE
;
40 virtual views::NonClientFrameView
* CreateStandardDesktopAppFrame() OVERRIDE
;
42 // Overridden from ui::BaseWindow:
43 virtual void Show() OVERRIDE
;
44 virtual void Activate() OVERRIDE
;
46 // Overridden from apps::NativeAppWindow:
47 virtual void UpdateShelfMenu() OVERRIDE
;
49 base::WeakPtrFactory
<ChromeNativeAppWindowViewsWin
> weak_ptr_factory_
;
51 // Populated if there is a glass frame, which provides special information
52 // to the native widget implementation. This will be NULL if there is no
53 // glass frame. Note, this can change from NULL to non-NULL and back again
54 // throughout the life of a window, e.g. if DWM is enabled and disabled.
55 GlassAppWindowFrameViewWin
* glass_frame_view_
;
57 // The Windows Application User Model ID identifying the app.
58 base::string16 app_model_id_
;
60 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin
);
63 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_