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

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

Issue 657143002: Set an href for the extension options pages link to get the correct mouse over (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <include src="extension_error.js"> 5 <include src="extension_error.js">
6 6
7 /** 7 /**
8 * The type of the extension data object. The definition is based on 8 * The type of the extension data object. The definition is based on
9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc 9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc
10 * and 10 * and
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 }); 272 });
273 fileAccess.querySelector('input').checked = extension.allowFileAccess; 273 fileAccess.querySelector('input').checked = extension.allowFileAccess;
274 fileAccess.hidden = false; 274 fileAccess.hidden = false;
275 } 275 }
276 276
277 // The 'Options' button or link, depending on its behaviour. 277 // The 'Options' button or link, depending on its behaviour.
278 if (extension.enabled && extension.optionsUrl) { 278 if (extension.enabled && extension.optionsUrl) {
279 var options, optionsClickListener; 279 var options, optionsClickListener;
280 if (extension.optionsOpenInTab) { 280 if (extension.optionsOpenInTab) {
281 options = node.querySelector('.options-link'); 281 options = node.querySelector('.options-link');
282 // Set an href to get the correct mouse-over appearance (link,
283 // footer) - but the actual link opening is done through chrome.send
284 // with a preventDefault().
285 options.setAttribute('href', extension.optionsPageHref);
282 optionsClickListener = function() { 286 optionsClickListener = function() {
283 chrome.send('extensionSettingsOptions', [extension.id]); 287 chrome.send('extensionSettingsOptions', [extension.id]);
284 }; 288 };
285 } else { 289 } else {
286 options = node.querySelector('.options-button'); 290 options = node.querySelector('.options-button');
287 optionsClickListener = function() { 291 optionsClickListener = function() {
288 this.showEmbeddedExtensionOptions_(extension.id, false); 292 this.showEmbeddedExtensionOptions_(extension.id, false);
289 }.bind(this); 293 }.bind(this);
290 } 294 }
291 options.addEventListener('click', function(e) { 295 options.addEventListener('click', function(e) {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 $('overlay').addEventListener('cancelOverlay', function() { 552 $('overlay').addEventListener('cancelOverlay', function() {
549 this.optionsShown_ = false; 553 this.optionsShown_ = false;
550 }.bind(this)); 554 }.bind(this));
551 }, 555 },
552 }; 556 };
553 557
554 return { 558 return {
555 ExtensionsList: ExtensionsList 559 ExtensionsList: ExtensionsList
556 }; 560 };
557 }); 561 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698