summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/ntp/apps.js
diff options
context:
space:
mode:
authorskerner@google.com <skerner@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 03:17:11 +0000
committerskerner@google.com <skerner@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 03:17:11 +0000
commita3b734b1277c1cd57819f4f0f754ad880cd32f3d (patch)
tree0796ef9750bea984bd1c44168eccd75f5fbe93cd /chrome/browser/resources/ntp/apps.js
parent381bc458bfc58a239f3dfe69b008c6d3522869a2 (diff)
downloadchromium_src-a3b734b1277c1cd57819f4f0f754ad880cd32f3d.zip
chromium_src-a3b734b1277c1cd57819f4f0f754ad880cd32f3d.tar.gz
chromium_src-a3b734b1277c1cd57819f4f0f754ad880cd32f3d.tar.bz2
Add "create Application Shortcut" to the app menu on NTP.
BUG=52451 TEST=Manually create app shortcuts for urls and apps. Review URL: http://codereview.chromium.org/5273004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/apps.js')
-rw-r--r--chrome/browser/resources/ntp/apps.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 3cbfc9e..9c032fe 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':