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

Unified Diff: chrome/browser/resources/ntp/apps.js

Issue 5273004: Add "create Application Shortcut" to the app menu on NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for commit. Created 10 years, 1 month 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/resources/new_new_tab.html ('k') | chrome/browser/shell_integration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp/apps.js
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 3cbfc9e1c70598e898c427da7805cf4a98586a68..9c032fef03dfb2113aa8e71b009145790ab196bf 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -21,10 +21,16 @@ function getAppsCallback(data) {
var appsPromoPing = PING_WEBSTORE_LAUNCH_PREFIX + '+' + data.showPromo;
var webStoreEntry;
- // Hide the app window menu option on platforms that do not support it.
+ // Hide menu options that are not supported on the OS or windowing system.
+
+ // The "Launch as Window" menu option.
$('apps-launch-type-window-menu-item').style.display =
(data.disableAppWindowLaunch ? 'none' : 'inline');
+ // The "Create App Shortcut" menu option.
+ $('apps-create-shortcut-command-menu-item').style.display =
+ (data.disableCreateAppShortcut ? 'none' : 'inline');
+
appsMiniview.textContent = '';
appsSectionContent.textContent = '';
@@ -218,6 +224,9 @@ var apps = (function() {
case 'apps-uninstall-command':
chrome.send('uninstallApp', [currentApp['id']]);
break;
+ case 'apps-create-shortcut-command':
+ chrome.send('createAppShortcut', [currentApp['id']]);
+ break;
case 'apps-launch-type-pinned':
case 'apps-launch-type-regular':
case 'apps-launch-type-fullscreen':
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | chrome/browser/shell_integration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698