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

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: Patch Set 2 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('extensionSettingsActivity', [extension.id]);
137 e.preventDefault();
138 });
137 activity.hidden = false; 139 activity.hidden = false;
138 } 140 }
139 141
140 // The 'View in Web Store/View Web Site' link. 142 // The 'View in Web Store/View Web Site' link.
141 if (extension.homepageUrl) { 143 if (extension.homepageUrl) {
142 var siteLink = node.querySelector('.site-link'); 144 var siteLink = node.querySelector('.site-link');
143 siteLink.href = extension.homepageUrl; 145 siteLink.href = extension.homepageUrl;
144 siteLink.textContent = loadTimeData.getString( 146 siteLink.textContent = loadTimeData.getString(
145 extension.homepageProvided ? 'extensionSettingsVisitWebsite' : 147 extension.homepageProvided ? 'extensionSettingsVisitWebsite' :
146 'extensionSettingsVisitWebStore'); 148 'extensionSettingsVisitWebStore');
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 258 }
257 259
258 this.appendChild(node); 260 this.appendChild(node);
259 }, 261 },
260 }; 262 };
261 263
262 return { 264 return {
263 ExtensionsList: ExtensionsList 265 ExtensionsList: ExtensionsList
264 }; 266 };
265 }); 267 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698