diff options
author | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 15:38:50 +0000 |
---|---|---|
committer | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 15:38:50 +0000 |
commit | fa6a910e5401983a7faa0489e7a26643fd7a2c0a (patch) | |
tree | 6f1ec4ca19504eb68f9a1758d96ad9c0b3ffc420 /chrome/browser/resources/ntp/apps.js | |
parent | a49d38f9ddf0b93844f3a7b0fe3d2e2a931e67be (diff) | |
download | chromium_src-fa6a910e5401983a7faa0489e7a26643fd7a2c0a.zip chromium_src-fa6a910e5401983a7faa0489e7a26643fd7a2c0a.tar.gz chromium_src-fa6a910e5401983a7faa0489e7a26643fd7a2c0a.tar.bz2 |
Add "open as window" menu item to NTP app menu.
BUG=59697
TEST=BrowserTest.OpenAppWindowLikeNtp,SessionRestoreUITest.RestoreAfterClosing*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66646
Review URL: http://codereview.chromium.org/5019005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/apps.js')
-rw-r--r-- | chrome/browser/resources/ntp/apps.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js index c8638c6..3cbfc9e 100644 --- a/chrome/browser/resources/ntp/apps.js +++ b/chrome/browser/resources/ntp/apps.js @@ -21,6 +21,10 @@ 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. + $('apps-launch-type-window-menu-item').style.display = + (data.disableAppWindowLaunch ? 'none' : 'inline'); + appsMiniview.textContent = ''; appsSectionContent.textContent = ''; @@ -145,10 +149,11 @@ var apps = (function() { var LaunchType = { LAUNCH_PINNED: 0, LAUNCH_REGULAR: 1, - LAUNCH_FULLSCREEN: 2 + LAUNCH_FULLSCREEN: 2, + LAUNCH_WINDOW: 3 }; - // Keep in sync with LaunchContainer in extension.h + // Keep in sync with LaunchContainer in extension_constants.h var LaunchContainer = { LAUNCH_WINDOW: 0, LAUNCH_PANEL: 1, @@ -184,7 +189,8 @@ var apps = (function() { // Update the commands related to the launch type. var launchTypeIds = ['apps-launch-type-pinned', 'apps-launch-type-regular', - 'apps-launch-type-fullscreen']; + 'apps-launch-type-fullscreen', + 'apps-launch-type-window']; launchTypeIds.forEach(function(id) { var command = $(id); command.disabled = isPanel; @@ -215,6 +221,7 @@ var apps = (function() { case 'apps-launch-type-pinned': case 'apps-launch-type-regular': case 'apps-launch-type-fullscreen': + case 'apps-launch-type-window': chrome.send('setLaunchType', [currentApp['id'], e.command.getAttribute('launch-type')]); break; |