summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_ui.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 22:29:24 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 22:29:24 +0000
commitb53ca567382de02e7a7d511cc03324bef39cb4c9 (patch)
treeacc3e223d91482e0b33d6a7f19e33e2d0149a580 /chrome/browser/extensions/extensions_ui.cc
parent80a19e459880c82eec00d3b52f76ce4c162ca4ee (diff)
downloadchromium_src-b53ca567382de02e7a7d511cc03324bef39cb4c9.zip
chromium_src-b53ca567382de02e7a7d511cc03324bef39cb4c9.tar.gz
chromium_src-b53ca567382de02e7a7d511cc03324bef39cb4c9.tar.bz2
Grouping the extensions and calling out the disabled
ones more prominently. Also added an unused string for 'getting more extensions', so we can translate. Converted 'Developer Tools' references to 'Developer Mode', to avoid confusion with Chrome's developer tools. TEST=Load extension b_foo through --load-extension. Open chrome://extensions/ and notice extension b_foo is on top, even though another extension a_foo normally would appear at the top due to alphabetical sorting. Then disable an extension and notice it should turn all gray. Enable, and it should no longer be gray. BUG=http://crbug.com/26699, http://crbug.com/25850 Review URL: http://codereview.chromium.org/365008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_ui.cc')
-rw-r--r--chrome/browser/extensions/extensions_ui.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index 06b9046..e4ef3cf 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -52,10 +52,10 @@ void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path,
DictionaryValue localized_strings;
localized_strings.SetString(L"title",
l10n_util::GetString(IDS_EXTENSIONS_TITLE));
- localized_strings.SetString(L"devToolsLink",
- l10n_util::GetString(IDS_EXTENSIONS_DEVELOPER_TOOLS_LINK));
- localized_strings.SetString(L"devToolsPrefix",
- l10n_util::GetString(IDS_EXTENSIONS_DEVELOPER_TOOLS_PREFIX));
+ localized_strings.SetString(L"devModeLink",
+ l10n_util::GetString(IDS_EXTENSIONS_DEVELOPER_MODE_LINK));
+ localized_strings.SetString(L"devModePrefix",
+ l10n_util::GetString(IDS_EXTENSIONS_DEVELOPER_MODE_PREFIX));
localized_strings.SetString(L"loadUnpackedButton",
l10n_util::GetString(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON));
localized_strings.SetString(L"packButton",
@@ -66,6 +66,8 @@ void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path,
l10n_util::GetString(IDS_EXTENSIONS_NONE_INSTALLED));
localized_strings.SetString(L"extensionDisabled",
l10n_util::GetString(IDS_EXTENSIONS_DISABLED_EXTENSION));
+ localized_strings.SetString(L"inDevelopment",
+ l10n_util::GetString(IDS_EXTENSIONS_IN_DEVELOPMENT));
localized_strings.SetString(L"extensionId",
l10n_util::GetString(IDS_EXTENSIONS_ID));
localized_strings.SetString(L"extensionVersion",
@@ -468,6 +470,14 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
extension_data->SetString(L"description", extension->description());
extension_data->SetString(L"version", extension->version()->GetString());
extension_data->SetBoolean(L"enabled", enabled);
+
+ // Determine the sort order: Extensions loaded through --load-extensions show
+ // up at the top. Disabled extensions show up at the bottom.
+ if (extension->location() == Extension::LOAD)
+ extension_data->SetInteger(L"order", 1);
+ else
+ extension_data->SetInteger(L"order", 2);
+
if (!extension->options_url().is_empty())
extension_data->SetString(L"options_url", extension->options_url().spec());