Infobar material design refresh: layout
[chromium-blink-merge.git] / chrome / browser / ui / views / apps / chrome_native_app_window_views_win.h
blob94560061de193c22f5de15de8a49c5c632ad2f42
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"
10 namespace web_app {
11 struct ShortcutInfo;
14 class GlassAppWindowFrameViewWin;
16 // Windows-specific parts of the views-backed native shell window implementation
17 // for packaged apps.
18 class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViewsAura {
19 public:
20 ChromeNativeAppWindowViewsWin();
21 ~ChromeNativeAppWindowViewsWin() override;
23 GlassAppWindowFrameViewWin* glass_frame_view() {
24 return glass_frame_view_;
27 private:
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:
47 void Show() override;
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.
64 bool is_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_