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

Unified Diff: chrome/browser/resources/ntp4/apps_page.js

Issue 899173002: Replace Webstore link with app info dialog link in chrome://apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement mac AppInfoDialog methods Created 5 years, 10 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/ntp4/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index 6c7ffae0cfc4da02c6169272e9415c765cac5dc6..7c33bd8edc8b955f399d3f3a650561c064525e5e 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -64,12 +64,20 @@ cr.define('ntp', function() {
this.launchTypeMenuSeparator_ = cr.ui.MenuItem.createSeparator();
menu.appendChild(this.launchTypeMenuSeparator_);
this.options_ = this.appendMenuItem_('appoptions');
- this.details_ = this.appendMenuItem_('appdetails');
this.uninstall_ = this.appendMenuItem_('appuninstall');
+
+ if (loadTimeData.getBoolean('canShowAppInfoDialog')) {
+ this.appinfo_ = this.appendMenuItem_('appinfodialog');
+ this.appinfo_.addEventListener('activate',
+ this.onShowAppInfo_.bind(this));
+ } else {
+ this.details_ = this.appendMenuItem_('appdetails');
+ this.details_.addEventListener('activate',
+ this.onShowDetails_.bind(this));
+ }
+
this.options_.addEventListener('activate',
this.onShowOptions_.bind(this));
- this.details_.addEventListener('activate',
- this.onShowDetails_.bind(this));
this.uninstall_.addEventListener('activate',
this.onUninstall_.bind(this));
@@ -141,7 +149,8 @@ cr.define('ntp', function() {
this.launchTypeMenuSeparator_.hidden = app.appData.packagedApp;
this.options_.disabled = !app.appData.optionsUrl || !app.appData.enabled;
- this.details_.disabled = !app.appData.detailsUrl;
+ if (this.details_)
+ this.details_.disabled = !app.appData.detailsUrl;
this.uninstall_.disabled = !app.appData.mayDisable;
if (cr.isMac) {
@@ -194,6 +203,9 @@ cr.define('ntp', function() {
onCreateShortcut_: function(e) {
chrome.send('createAppShortcut', [this.app_.appData.id]);
},
+ onShowAppInfo_: function(e) {
+ chrome.send('showAppInfo', [this.app_.appData.id]);
+ }
};
/**
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_controller_delegate.cc » ('j') | chrome/browser/ui/apps/app_info_dialog.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698