Commit e9a62602 authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

Reorder "action links" on chrome://extensions

Move the Options, Permissions, Visit website, Launch, and
Reload links to be on the same line in the
chrome://extensions page, directly below the description (so
they are in the same place for all extensions in the list).

Also reword "Visit website" to be either "Details" or
"Developer website", depending on whether it will link to
the developer's website or the chrome web store.

Finally, tweak the css to give a bit more padding to the
description and make the version text grey.

----------------------------

NOTE: The reviewed version of this patch is at
https://codereview.chromium.org/540113002, but that one had the wrong
Base URL (whoops).

(TBRs are original reviewers)
TBR=dbeam@chromium.org
TBR=yoz@chromium.org

BUG=410895

Review URL: https://codereview.chromium.org/550443003

Cr-Commit-Position: refs/heads/master@{#293739}
parent 833089c8
......@@ -4795,10 +4795,10 @@ Make sure you do not expose any sensitive information.
Allow access to file URLs
</message>
<message name="IDS_EXTENSIONS_VISIT_WEBSITE" desc="The link for visiting the extension's homepage.">
Visit website
Developer website
</message>
<message name="IDS_EXTENSIONS_VISIT_WEBSTORE" desc="The link for visiting the extension's gallery page.">
View in Web Store
Details
</message>
<message name="IDS_EXTENSIONS_RELOAD_TERMINATED" desc="The link for reloading extensions.">
Reload
......
......@@ -200,8 +200,9 @@ cr.define('options', function() {
var blacklistText = node.querySelector('.blacklist-text');
blacklistText.textContent = extension.blacklistText;
var description = node.querySelector('.extension-description span');
var description = document.createElement('span');
description.textContent = extension.description;
node.querySelector('.extension-description').appendChild(description);
// The 'Show Browser Action' button.
if (extension.enable_show_button) {
......
......@@ -187,6 +187,11 @@ html[dir=rtl] #footer-section {
min-height: 48px;
}
.extension-list-item a {
-webkit-margin-start: 0.5em;
display: inline-block;
}
html[dir='rtl'] .extension-list-item {
background-position: right;
}
......@@ -215,12 +220,23 @@ html[dir='rtl'] .extension-list-item {
white-space: normal;
}
.action-links {
-webkit-margin-after: 0.5em;
}
.action-links :-webkit-any(a, .link-button) {
-webkit-margin-end: 1em;
-webkit-margin-start: 0;
}
.extension-details {
-webkit-box-flex: 1;
-webkit-padding-end: 7px;
-webkit-padding-start: 55px;
}
.extension-description,
.extension-version,
.extension-list-item-wrapper.inactive-extension .extension-details,
.location-text,
.blacklist-text,
......@@ -263,11 +279,6 @@ html[dir='rtl'] .extension-list-item {
padding-top: 7px;
}
.extension-list-item a {
-webkit-margin-start: 0.5em;
display: inline-block;
}
.install-warnings a {
-webkit-margin-start: 0;
}
......@@ -376,10 +387,6 @@ html[dir='rtl'] #extension-settings .trash {
padding: 5px 0 5px 5px;
}
.may-not-modify .optional-controls .optional-controls-disableable {
display: none;
}
/* Supervised users */
.page:not(.profile-is-supervised) .profile-is-supervised-banner,
......
......@@ -133,14 +133,19 @@
<span class="extension-title"></span>
<span class="extension-version"></span>
</div>
<p class="extension-description">
<span></span>
<a class="permissions-link"
i18n-content="extensionSettingsPermissions"
href="#">
</a>
<p class="extension-description"></p>
<div class="action-links">
<button class="permissions-link link-button"
i18n-content="extensionSettingsPermissions"></button>
<button class="options-link link-button"
i18n-content="extensionSettingsOptions" hidden></button>
<a class="site-link" target="_parent" hidden></a>
</p>
<button class="launch-link link-button"
i18n-content="extensionSettingsLaunch" hidden></button>
<button class="reload-link link-button"
i18n-content="extensionSettingsReloadUnpacked" hidden>
</button>
</div>
<div class="permanent-warnings">
<div class="extension-warnings" hidden>
<span i18n-content="extensionSettingsWarningsTitle"></span>
......@@ -212,19 +217,12 @@
<span i18n-content="extensionSettingsAllowOnAllUrls"></span>
</label>
</div>
<span class="optional-controls-disableable">
<label class="file-access-control" hidden>
<div class="checkbox file-access-control" hidden>
<label>
<input type="checkbox">
<span i18n-content="extensionSettingsAllowFileAccess"></span>
</label>
<a class="reload-link"
i18n-content="extensionSettingsReloadUnpacked"
href="#" hidden></a>
<a class="launch-link" i18n-content="extensionSettingsLaunch"
href="#" hidden></a>
</span>
<a class="options-link" i18n-content="extensionSettingsOptions"
href="#" hidden></a>
</div>
</div>
<div class="butter-bar"
i18n-values=".innerHTML:extensionSettingsIncognitoWarning" hidden>
......
......@@ -269,7 +269,7 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app());
extension_data->SetBoolean("is_platform_app", extension->is_platform_app());
extension_data->SetBoolean("homepageProvided",
ManifestURL::GetHomepageURL(extension).is_valid());
ManifestURL::SpecifiedHomepageURL(extension));
// Add dependent extensions.
base::ListValue* dependents_list = new base::ListValue;
......
......@@ -65,6 +65,11 @@ const GURL ManifestURL::GetHomepageURL(const Extension* extension) {
: GURL::EmptyGURL();
}
// static
bool ManifestURL::SpecifiedHomepageURL(const Extension* extension) {
return GetManifestURL(extension, keys::kHomepageURL).is_valid();
}
// static
const GURL& ManifestURL::GetUpdateURL(const Extension* extension) {
return GetManifestURL(extension, keys::kUpdateURL);
......
......@@ -30,6 +30,10 @@ struct ManifestURL : public Extension::ManifestData {
// this returns a blank GURL.
static const GURL GetHomepageURL(const Extension* extension);
// Returns true if the extension specified a valid home page url in the
// manifest.
static bool SpecifiedHomepageURL(const Extension* extension);
// Returns the Update URL for this extension.
static const GURL& GetUpdateURL(const Extension* extension);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment