Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit 55721c1

Browse files
kalmanCommit bot
kalman
authored and
Commit bot
committed
Set an href for the extension options pages link to get the correct mouse over
behaviour. BUG=409319 [email protected] Review URL: https://codereview.chromium.org/657143002 Cr-Commit-Position: refs/heads/master@{#299749}
1 parent f079dfd commit 55721c1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

chrome/browser/resources/extensions/extension_list.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ cr.define('options', function() {
279279
var options, optionsClickListener;
280280
if (extension.optionsOpenInTab) {
281281
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);
282286
optionsClickListener = function() {
283287
chrome.send('extensionSettingsOptions', [extension.id]);
284288
};

chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
287287
ManifestURL::SpecifiedHomepageURL(extension));
288288
extension_data->SetBoolean("optionsOpenInTab",
289289
OptionsPageInfo::ShouldOpenInTab(extension));
290+
extension_data->SetString("optionsPageHref",
291+
OptionsPageInfo::GetOptionsPage(extension).spec());
290292

291293
// Add dependent extensions.
292294
base::ListValue* dependents_list = new base::ListValue;

0 commit comments

Comments
 (0)