summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/generated_resources.grd3
-rw-r--r--chrome/browser/extensions/extensions_ui.cc6
-rw-r--r--chrome/browser/resources/extensions_ui.html21
-rw-r--r--chrome/common/extensions/extension.cc3
-rw-r--r--chrome/common/extensions/extension.h3
5 files changed, 33 insertions, 3 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 0945b04..174b202 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -2646,6 +2646,9 @@ each locale. -->
<message name="IDS_EXTENSIONS_NONE_INSTALLED" desc="Text that lets the user know that no extensions are installed.">
Boo... No extensions installed :-(
</message>
+ <message name="IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY" desc="Text on next line after IDS_EXTENSIONS_NONE_INSTALLED that suggests the user look in the gallery for extensions to install.">
+ Want to <ph name="BEGIN_LINK">$1</ph>browse the gallery<ph name="END_LINK">$2</ph> instead?
+ </message>
<message name="IDS_EXTENSIONS_DISABLED_EXTENSION" desc="Text that signifies that the extension is currently disabled.">
(Disabled)
</message>
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index 70c9fa1..7f66418 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -70,6 +70,12 @@ void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path,
l10n_util::GetString(IDS_EXTENSIONS_UPDATE_BUTTON));
localized_strings.SetString(L"noExtensions",
l10n_util::GetString(IDS_EXTENSIONS_NONE_INSTALLED));
+ localized_strings.SetString(L"suggestGallery",
+ l10n_util::GetStringF(IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY,
+ std::wstring(L"<a href='") +
+ ASCIIToWide(Extension::kGalleryBrowseUrl) +
+ L"'>",
+ L"</a>"));
localized_strings.SetString(L"extensionDisabled",
l10n_util::GetString(IDS_EXTENSIONS_DISABLED_EXTENSION));
localized_strings.SetString(L"inDevelopment",
diff --git a/chrome/browser/resources/extensions_ui.html b/chrome/browser/resources/extensions_ui.html
index 8acb98b..66eb521 100644
--- a/chrome/browser/resources/extensions_ui.html
+++ b/chrome/browser/resources/extensions_ui.html
@@ -140,7 +140,14 @@ body.showDevMode .showInDevMode {
}
.no-extensions {
- margin: 1em 0.5em;
+ margin: 6em 0 0;
+ text-align: center;
+ font-size: 1.2em;
+}
+
+#try-gallery {
+ margin-top: 1em;
+ font-weight :normal;
}
.extension-description {
@@ -363,6 +370,12 @@ function renderTemplate(extensionsData) {
var input = new JsEvalContext(extensionsData);
var output = document.getElementById('extensionTemplate');
jstProcess(input, output);
+
+ // Blech, JSTemplate always inserts the strings as text, which is usually a
+ // feature, but in this case it contains HTML that we want to be rendered.
+ var elm = document.getElementById("try-gallery");
+ if (elm)
+ elm.innerHTML = elm.textContent;
}
/**
@@ -651,8 +664,10 @@ function autoUpdate() {
</div>
<div class="content">
- <div class="extension-name no-extensions" jsdisplay="extensions.length === 0"
- i18n-content="noExtensions">NO_EXTENSIONS_ARE_INSTALLED</div>
+ <div class="extension-name no-extensions" jsdisplay="extensions.length === 0">
+ <div i18n-content="noExtensions">NO_EXTENSIONS_ARE_INSTALLED</div>
+ <div i18n-content="suggestGallery" id="try-gallery">TRY_GALLERY</div>
+ </div>
<div jsdisplay="extensions.length > 0">
<div class="extension" jsselect="extensions">
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 0aad3de..87ab9b6 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -86,6 +86,9 @@ static const wchar_t* kValidThemeKeys[] = {
keys::kUpdateURL
};
+const char* Extension::kGalleryBrowseUrl =
+ "https://chrome.google.com/extensions";
+
#if defined(OS_WIN)
const char* Extension::kExtensionRegistryPath =
"Software\\Google\\Chrome\\Extensions";
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index d240388..24afa3a 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -63,6 +63,9 @@ class Extension {
EXTENSION_ICON_BITTY = 16,
};
+ // The URL to browse the extensions gallery.
+ static const char* kGalleryBrowseUrl;
+
// Icon sizes used by the extension system.
static const int kIconSizes[];