Chromium Code Reviews| Index: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc |
| diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc |
| index dfac3ccb9df96687260667119b6d559880f36475..2cea0ffaa180e2eb0bb5ab0a00b086630032c36e 100644 |
| --- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc |
| +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc |
| @@ -23,6 +23,11 @@ |
| #include "ui/views/controls/webview/webview.h" |
| #include "ui/views/widget/widget.h" |
| +#if defined(OS_CHROMEOS) |
| +#include "ash/shared/app_types.h" |
| +#include "chrome/browser/chromeos/note_taking_app_utils.h" |
| +#endif |
| + |
| using extensions::AppWindow; |
| namespace { |
| @@ -141,6 +146,16 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow( |
| OnBeforeWidgetInit(create_params, &init_params, widget()); |
| widget()->Init(init_params); |
| +#if defined(OS_CHROMEOS) |
| + ash::AppType appType = ash::AppType::CHROME_APP; |
|
Daniel Erat
2016/09/27 19:15:10
s/appType/app_type/
xiaoyinh(OOO Sep 11-29)
2016/09/29 20:37:43
Done. I've moved this logic to chrome_native_app_w
|
| + Profile* profile = |
| + Profile::FromBrowserContext(app_window()->browser_context()); |
| + if (profile && chromeos::IsNoteTakingApp(app_window(), profile)) |
| + appType = ash::AppType::DEFAULT_NOTE_TAKING_APP; |
| + widget()->GetNativeWindow()->SetProperty(aura::client::kAppType, |
| + static_cast<int>(appType)); |
| +#endif |
| + |
| // The frame insets are required to resolve the bounds specifications |
| // correctly. So we set the window bounds and constraints now. |
| gfx::Insets frame_insets = GetFrameInsets(); |