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

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, 8 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 83882)
+++ chrome/browser/resources/ntp/apps.js (working copy)
@@ -705,6 +705,11 @@
img.onload = function() { this.loadedImages++; }.bind(this);
img.src = app['icon_big'];
+ if (app['is_component']) {
Evan Stade 2011/05/03 17:02:55 probably clearer to do (here and below): // User
dgozman 2011/05/24 12:55:21 Done.
+ // User cannot change launch options or uninstall component extension.
+ return div;
+ }
+
var settingsButton = div.appendChild(new cr.ui.ContextMenuButton);
settingsButton.className = 'app-settings';
settingsButton.title = localStrings.getString('appsettings');
@@ -728,6 +733,11 @@
a.className = 'item';
span.appendChild(a);
+ if (app['is_component']) {
+ // User cannot change launch options or uninstall component extension.
+ return span;
+ }
+
addContextMenu(span, app);
return span;
@@ -744,6 +754,11 @@
a.style.backgroundImage = url(app['icon_small']);
a.className = 'item';
+ if (app['is_component']) {
+ // User cannot change launch options or uninstall component extension.
+ return a;
+ }
+
addContextMenu(a, app);
return a;

Powered by Google App Engine
This is Rietveld 408576698