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

Unified Diff: apps/shell_window.cc

Issue 158643002: Add option to install an ephemeral app to the Windows jump list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added notimplemented Created 6 years, 10 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 | « no previous file | apps/ui/native_app_window.h » ('j') | chrome/browser/ui/views/apps/jumplist_updater_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell_window.cc
diff --git a/apps/shell_window.cc b/apps/shell_window.cc
index 9c0247aef560ccf9a429c63df120539be4d452a9..7e0145d5ce3d9fe7d324d1533b0c9992bf4f37ba 100644
--- a/apps/shell_window.cc
+++ b/apps/shell_window.cc
@@ -212,6 +212,9 @@ void ShellWindow::Init(const GURL& url,
// Close when the browser process is exiting.
registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING,
content::NotificationService::AllSources());
+ // Update the app menu if an ephemeral app becomes installed.
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ content::Source<Profile>(profile_));
shell_window_contents_->LoadContents(new_params.creator_process_id);
@@ -747,6 +750,15 @@ void ShellWindow::Observe(int type,
native_app_window_->Close();
break;
}
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ const extensions::Extension* installed_extension =
+ content::Details<const extensions::InstalledExtensionInfo>(
+ details)->extension;
+ DCHECK(installed_extension);
+ if (installed_extension->id() == extension_->id())
+ native_app_window_->UpdateAppMenu();
+ break;
+ }
case chrome::NOTIFICATION_APP_TERMINATING:
native_app_window_->Close();
break;
« no previous file with comments | « no previous file | apps/ui/native_app_window.h » ('j') | chrome/browser/ui/views/apps/jumplist_updater_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698