Chromium Code Reviews| Index: chrome/browser/resources/ntp/apps.js |
| diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js |
| index 7069231791796f6567bf1db4a89a6506139f5f25..2e4a92cfa76fa30f411b866a28cbea214333d701 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 = |
|
Aaron Boodman
2010/11/18 07:49:03
I think it would be a little neater to just do thi
Sam Kerner (Chrome)
2010/11/18 15:34:01
What if the user changes the user agent? This is
Aaron Boodman
2010/11/18 16:16:00
Good point.
arv (Not doing code reviews)
2010/11/18 19:02:49
If they change the user agent they are opening the
arv (Not doing code reviews)
2010/11/18 19:02:49
cr.isMac
|
| + (data.disableAppWindowLaunch ? 'none' : 'inline'); |
| + |
| appsMiniview.textContent = ''; |
| appsSectionContent.textContent = ''; |
| @@ -150,10 +154,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; |