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