diff options
author | kochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-20 08:25:41 +0000 |
---|---|---|
committer | kochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-20 08:25:41 +0000 |
commit | bec884688981f69f84f1567bafad6195e3fcf1b8 (patch) | |
tree | cbd6d5c90ddd6901dee74d2c87abe6c14a38b2c4 | |
parent | 93cb2ec5e085b5e29dc4d7a21b1417dd812d15c0 (diff) | |
download | chromium_src-bec884688981f69f84f1567bafad6195e3fcf1b8.zip chromium_src-bec884688981f69f84f1567bafad6195e3fcf1b8.tar.gz chromium_src-bec884688981f69f84f1567bafad6195e3fcf1b8.tar.bz2 |
Disable 'create shortcut' in newtab apps pulldown menu.
BUG=chromium-os:10364
TEST=manually check if pulldown menu of apps on newtab page doesn't have 'create shortcut' menu.
Review URL: http://codereview.chromium.org/6057002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69699 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/dom_ui/app_launcher_handler.cc | 5 | ||||
-rw-r--r-- | chrome/browser/resources/new_new_tab.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/ntp/apps.js | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc index 01bffa9..cad0727 100644 --- a/chrome/browser/dom_ui/app_launcher_handler.cc +++ b/chrome/browser/dom_ui/app_launcher_handler.cc @@ -186,6 +186,11 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) { dictionary->SetBoolean("disableAppWindowLaunch", true); dictionary->SetBoolean("disableCreateAppShortcut", true); #endif +#if defined(OS_CHROMEOS) + // Making shortcut does not make sense on ChromeOS because it does not have + // a desktop. + dictionary->SetBoolean("disableCreateAppShortcut", true); +#endif } void AppLauncherHandler::HandleGetApps(const ListValue* args) { diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html index 5722024..3d50ca0 100644 --- a/chrome/browser/resources/new_new_tab.html +++ b/chrome/browser/resources/new_new_tab.html @@ -259,7 +259,7 @@ if ('mode' in hashParams) { <hr> <button command="#apps-options-command"></button> <button command="#apps-uninstall-command"></button> - <hr> + <hr id="apps-create-shortcut-command-separator"> <button id="apps-create-shortcut-command-menu-item" command="#apps-create-shortcut-command"></button> </menu> diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js index 2be85fa..eef4fa2 100644 --- a/chrome/browser/resources/ntp/apps.js +++ b/chrome/browser/resources/ntp/apps.js @@ -35,6 +35,7 @@ function getAppsCallback(data) { // The "Create App Shortcut" menu option. $('apps-create-shortcut-command-menu-item').style.display = + $('apps-create-shortcut-command-separator').style.display = (data.disableCreateAppShortcut ? 'none' : 'inline'); appsMiniview.textContent = ''; |