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

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

Issue 3517004: Revert 60997 - o Add user customizable launch type for apps by adding options... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 months 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/resources/shared/css/menu.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp/apps.js
===================================================================
--- chrome/browser/resources/ntp/apps.js (revision 60999)
+++ chrome/browser/resources/ntp/apps.js (working copy)
@@ -36,15 +36,6 @@
}
}
-function appsPrefChangeCallback(data) {
- // Currently the only pref that is watched is the launch type.
- data.apps.forEach(function(app) {
- var appLink = document.querySelector('.app a[app-id=' + app['id'] + ']');
- if (appLink)
- appLink.setAttribute('launch-type', app['launch_type']);
- });
-}
-
var apps = (function() {
function createElement(app) {
@@ -53,7 +44,6 @@
var a = div.appendChild(document.createElement('a'));
a.setAttribute('app-id', app['id']);
- a.setAttribute('launch-type', app['launch_type']);
a.xtitle = a.textContent = app['name'];
a.href = app['launch_url'];
@@ -109,20 +99,6 @@
return false;
}
- // Keep in sync with LaunchType in extension_prefs.h
- var LaunchType = {
- LAUNCH_PINNED: 0,
- LAUNCH_REGULAR: 1,
- LAUNCH_FULLSCREEN: 2
- };
-
- // Keep in sync with LaunchContainer in extension.h
- var LaunchContainer = {
- LAUNCH_WINDOW: 0,
- LAUNCH_PANEL: 1,
- LAUNCH_TAB: 2
- };
-
var currentApp;
function addContextMenu(el, app) {
@@ -137,24 +113,6 @@
$('apps-launch-command').label = app['name'];
$('apps-options-command').canExecuteChange();
- var appLinkSel = '.app a[app-id=' + app['id'] + ']';
- var launchType =
- el.querySelector(appLinkSel).getAttribute('launch-type');
-
- var launchContainer = app['launch_container'];
- var isPanel = launchContainer == LaunchContainer.LAUNCH_PANEL;
-
- // Update the commands related to the launch type.
- var launchTypeIds = ['apps-launch-type-pinned',
- 'apps-launch-type-regular',
- 'apps-launch-type-fullscreen'];
- launchTypeIds.forEach(function(id) {
- var command = $(id);
- command.disabled = isPanel;
- command.checked = !isPanel &&
- launchType == command.getAttribute('launch-type');
- });
-
return $('app-context-menu');
}
});
@@ -164,8 +122,7 @@
if (!currentApp)
return;
- var commandId = e.command.id;
- switch (commandId) {
+ switch (e.command.id) {
case 'apps-options-command':
window.location = currentApp['options_url'];
break;
@@ -175,12 +132,6 @@
case 'apps-uninstall-command':
chrome.send('uninstallApp', [currentApp['id']]);
break;
- case 'apps-launch-type-pinned':
- case 'apps-launch-type-regular':
- case 'apps-launch-type-fullscreen':
- 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/resources/shared/css/menu.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698