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

Side by Side Diff: chrome/browser/resources/extensions/extension_list.js

Issue 10449010: Fix the extension activity log UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Evan's comments. Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options', function() { 5 cr.define('options', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * A lookup helper function to find the first node that has an id (starting 9 * A lookup helper function to find the first node that has an id (starting
10 * at |node| and going up the parent chain). 10 * at |node| and going up the parent chain).
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 var options = node.querySelector('.options-link'); 125 var options = node.querySelector('.options-link');
126 options.addEventListener('click', function(e) { 126 options.addEventListener('click', function(e) {
127 chrome.send('extensionSettingsOptions', [extension.id]); 127 chrome.send('extensionSettingsOptions', [extension.id]);
128 e.preventDefault(); 128 e.preventDefault();
129 }); 129 });
130 options.hidden = false; 130 options.hidden = false;
131 } 131 }
132 132
133 if (extension.allow_activity) { 133 if (extension.allow_activity) {
134 var activity = node.querySelector('.activity-link'); 134 var activity = node.querySelector('.activity-link');
135 activity.href = 'chrome://extension-activity?extensionId=' + 135 activity.addEventListener('click', function(e) {
136 extension.id; 136 chrome.send('navigateToUrl', [
137 'chrome://extension-activity?extensionId=' + extension.id,
138 '_blank',
139 e.button,
140 e.altKey,
141 e.ctrlKey,
142 e.metaKey,
143 e.shiftKey
144 ]);
145 e.preventDefault();
146 });
137 activity.hidden = false; 147 activity.hidden = false;
138 } 148 }
139 149
140 // The 'View in Web Store/View Web Site' link. 150 // The 'View in Web Store/View Web Site' link.
141 if (extension.homepageUrl) { 151 if (extension.homepageUrl) {
142 var siteLink = node.querySelector('.site-link'); 152 var siteLink = node.querySelector('.site-link');
143 siteLink.href = extension.homepageUrl; 153 siteLink.href = extension.homepageUrl;
144 siteLink.textContent = loadTimeData.getString( 154 siteLink.textContent = loadTimeData.getString(
145 extension.homepageProvided ? 'extensionSettingsVisitWebsite' : 155 extension.homepageProvided ? 'extensionSettingsVisitWebsite' :
146 'extensionSettingsVisitWebStore'); 156 'extensionSettingsVisitWebStore');
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 266 }
257 267
258 this.appendChild(node); 268 this.appendChild(node);
259 }, 269 },
260 }; 270 };
261 271
262 return { 272 return {
263 ExtensionsList: ExtensionsList 273 ExtensionsList: ExtensionsList
264 }; 274 };
265 }); 275 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/extensions/extension_activity.js ('k') | chrome/browser/ui/webui/extensions/extension_activity_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698