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

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

Issue 6912024: Support for component extensions as apps on the new tab page. Added filebrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
Index: chrome/browser/resources/ntp/apps.js
===================================================================
--- chrome/browser/resources/ntp/apps.js (revision 86287)
+++ chrome/browser/resources/ntp/apps.js (working copy)
@@ -705,12 +705,14 @@
img.onload = function() { this.loadedImages++; }.bind(this);
img.src = app['icon_big'];
- var settingsButton = div.appendChild(new cr.ui.ContextMenuButton);
- settingsButton.className = 'app-settings';
- settingsButton.title = localStrings.getString('appsettings');
+ // User cannot change launch options or uninstall component extension.
+ if (!app['is_component']) {
+ var settingsButton = div.appendChild(new cr.ui.ContextMenuButton);
+ settingsButton.className = 'app-settings';
+ settingsButton.title = localStrings.getString('appsettings');
+ addContextMenu(div, app);
+ }
- addContextMenu(div, app);
-
return div;
},
@@ -728,7 +730,10 @@
a.className = 'item';
span.appendChild(a);
- addContextMenu(span, app);
+ // User cannot change launch options or uninstall component extension.
+ if (!app['is_component']) {
+ addContextMenu(span, app);
+ }
return span;
},
@@ -744,7 +749,10 @@
a.style.backgroundImage = url(app['icon_small']);
a.className = 'item';
- addContextMenu(a, app);
+ // User cannot change launch options or uninstall component extension.
+ if (!app['is_component']) {
+ addContextMenu(a, app);
+ }
return a;
},
« no previous file with comments | « chrome/browser/resources/file_manager/manifest.json ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698