Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc

Issue 589303002: App windows launched in windows ASH should not be messing with the AppUserModelId for the remote HW… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
index c0c63a61e6ad3ed2d1dc0c56b5de8975055ca3a0..63bb153c3fb9a68507edf764153e0cd5a03e3408 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
@@ -108,6 +108,11 @@ void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow(
const extensions::AppWindow::CreateParams& create_params) {
ChromeNativeAppWindowViews::InitializeDefaultWindow(create_params);
+ // Remaining initialization is for Windows shell integration, which doesn't
+ // apply to app windows in Ash.
+ if (IsRunningInAsh())
+ return;
+
const extensions::Extension* extension = app_window()->GetExtension();
if (!extension)
return;
@@ -122,10 +127,9 @@ void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow(
ShellIntegration::GetAppModelIdForProfile(app_name_wide,
profile->GetPath());
ui::win::SetAppIdForWindow(app_model_id_, hwnd);
-
web_app::UpdateRelaunchDetailsForApp(profile, extension, hwnd);
- if (!create_params.alpha_enabled && !IsRunningInAsh())
+ if (!create_params.alpha_enabled)
EnsureCaptionStyleSet();
UpdateShelfMenu();
}
@@ -151,7 +155,7 @@ void ChromeNativeAppWindowViewsWin::Activate() {
}
void ChromeNativeAppWindowViewsWin::UpdateShelfMenu() {
- if (!JumpListUpdater::IsEnabled())
+ if (!JumpListUpdater::IsEnabled() || IsRunningInAsh())
return;
// Currently the only option is related to ephemeral apps, so avoid updating
@@ -170,6 +174,8 @@ void ChromeNativeAppWindowViewsWin::UpdateShelfMenu() {
if (!PathService::Get(base::FILE_EXE, &chrome_path))
return;
+ DCHECK(!app_model_id_.empty());
+
JumpListUpdater jumplist_updater(app_model_id_);
if (!jumplist_updater.BeginUpdate())
return;
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698