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

Side by Side Diff: chrome/browser/resources/ntp/apps.js

Issue 6057002: Disable 'create shortcut' in newtab apps pulldown menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser
Patch Set: Also hide <hr> Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var MAX_APPS_PER_ROW = []; 5 var MAX_APPS_PER_ROW = [];
6 MAX_APPS_PER_ROW[LayoutMode.SMALL] = 4; 6 MAX_APPS_PER_ROW[LayoutMode.SMALL] = 4;
7 MAX_APPS_PER_ROW[LayoutMode.NORMAL] = 6; 7 MAX_APPS_PER_ROW[LayoutMode.NORMAL] = 6;
8 8
9 // The URL prefix used in the app link 'ping' attributes. 9 // The URL prefix used in the app link 'ping' attributes.
10 var PING_APP_LAUNCH_PREFIX = 'record-app-launch'; 10 var PING_APP_LAUNCH_PREFIX = 'record-app-launch';
(...skipping 17 matching lines...) Expand all
28 var webStoreEntry, webStoreMiniEntry; 28 var webStoreEntry, webStoreMiniEntry;
29 29
30 // Hide menu options that are not supported on the OS or windowing system. 30 // Hide menu options that are not supported on the OS or windowing system.
31 31
32 // The "Launch as Window" menu option. 32 // The "Launch as Window" menu option.
33 $('apps-launch-type-window-menu-item').style.display = 33 $('apps-launch-type-window-menu-item').style.display =
34 (data.disableAppWindowLaunch ? 'none' : 'inline'); 34 (data.disableAppWindowLaunch ? 'none' : 'inline');
35 35
36 // The "Create App Shortcut" menu option. 36 // The "Create App Shortcut" menu option.
37 $('apps-create-shortcut-command-menu-item').style.display = 37 $('apps-create-shortcut-command-menu-item').style.display =
38 $('apps-create-shortcut-command-separator').style.display =
38 (data.disableCreateAppShortcut ? 'none' : 'inline'); 39 (data.disableCreateAppShortcut ? 'none' : 'inline');
arv (Not doing code reviews) 2010/12/20 19:01:08 This looks wrong. The display of these should neve
kochi 2010/12/21 06:09:33 Good catch! I created a follow-up CL at http://cod
39 40
40 appsMiniview.textContent = ''; 41 appsMiniview.textContent = '';
41 appsSectionContent.textContent = ''; 42 appsSectionContent.textContent = '';
42 43
43 data.apps.sort(function(a,b) { 44 data.apps.sort(function(a,b) {
44 return a.app_launch_index - b.app_launch_index; 45 return a.app_launch_index - b.app_launch_index;
45 }); 46 });
46 47
47 clearClosedMenu(apps.menu); 48 clearClosedMenu(apps.menu);
48 data.apps.forEach(function(app) { 49 data.apps.forEach(function(app) {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 createWebStoreClosedMenuElement: function() { 352 createWebStoreClosedMenuElement: function() {
352 var a = document.createElement('a'); 353 var a = document.createElement('a');
353 a.textContent = localStrings.getString('web_store_title'); 354 a.textContent = localStrings.getString('web_store_title');
354 a.href = localStrings.getString('web_store_url'); 355 a.href = localStrings.getString('web_store_url');
355 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16'); 356 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16');
356 a.className = 'item'; 357 a.className = 'item';
357 return a; 358 return a;
358 } 359 }
359 }; 360 };
360 })(); 361 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698