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

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

Issue 5019005: Add "open as window" menu item to NTP app menu. (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/sessions/session_restore.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 c8638c601fd3d72b22f3ca19f6a9ef72c477f13c..3cbfc9e1c70598e898c427da7805cf4a98586a68 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;
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698