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_aura.h"
14 class GlassAppWindowFrameViewWin
;
16 // Windows-specific parts of the views-backed native shell window implementation
18 class ChromeNativeAppWindowViewsWin
: public ChromeNativeAppWindowViewsAura
{
20 ChromeNativeAppWindowViewsWin();
21 ~ChromeNativeAppWindowViewsWin() override
;
23 GlassAppWindowFrameViewWin
* glass_frame_view() {
24 return glass_frame_view_
;
28 void ActivateParentDesktopIfNecessary();
30 void OnShortcutInfoLoaded(
31 const web_app::ShortcutInfo
& shortcut_info
);
33 HWND
GetNativeAppWindowHWND() const;
34 bool IsRunningInAsh();
35 void EnsureCaptionStyleSet();
37 // Overridden from ChromeNativeAppWindowViews:
38 void OnBeforeWidgetInit(
39 const extensions::AppWindow::CreateParams
& create_params
,
40 views::Widget::InitParams
* init_params
,
41 views::Widget
* widget
) override
;
42 void InitializeDefaultWindow(
43 const extensions::AppWindow::CreateParams
& create_params
) override
;
44 views::NonClientFrameView
* CreateStandardDesktopAppFrame() override
;
46 // Overridden from ui::BaseWindow:
48 void Activate() override
;
50 // Overridden from views::WidgetDelegate:
51 bool CanMinimize() const override
;
53 // Populated if there is a glass frame, which provides special information
54 // to the native widget implementation. This will be NULL if there is no
55 // glass frame. Note, this can change from NULL to non-NULL and back again
56 // throughout the life of a window, e.g. if DWM is enabled and disabled.
57 GlassAppWindowFrameViewWin
* glass_frame_view_
;
59 // The Windows Application User Model ID identifying the app.
60 // Not set for windows running inside Ash.
61 base::string16 app_model_id_
;
63 // Whether the InitParams indicated that this window should be translucent.
66 base::WeakPtrFactory
<ChromeNativeAppWindowViewsWin
> weak_ptr_factory_
;
68 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsWin
);
71 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_WIN_H_