diff options
Diffstat (limited to 'chrome')
6 files changed, 15 insertions, 10 deletions
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index 7cc5118..55c05e0 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -597,6 +597,8 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue( extension_data->SetString(L"description", extension->description()); extension_data->SetString(L"version", extension->version()->GetString()); extension_data->SetBoolean(L"enabled", enabled); + extension_data->SetBoolean(L"allow_reload", + extension->location() == Extension::LOAD); // Determine the sort order: Extensions loaded through --load-extensions show // up at the top. Disabled extensions show up at the bottom. diff --git a/chrome/browser/resources/extensions_ui.html b/chrome/browser/resources/extensions_ui.html index 8873aa0..fa27d72 100644 --- a/chrome/browser/resources/extensions_ui.html +++ b/chrome/browser/resources/extensions_ui.html @@ -258,6 +258,7 @@ var extensionDataFormat = { "description": "Extension long format description", "version": "1.0.231", "enabled": "true", + "allow_reload": true, "order": 1, "options_url": "options.html", "icon": "relative-path-to-icon.png", @@ -296,6 +297,7 @@ var extensionDataFormat = { "description": "Extension long format description", "version": "1.0.231", "enabled": "true", + "allow_reload": false, "order": 2, "icon": "", "content_scripts": [ @@ -694,6 +696,14 @@ function autoUpdate() { <span class="extension-actions"> <a jsvalues=".extensionId:id" + jsdisplay="enabled && allow_reload" + onclick="handleReloadExtension(this)" + href="javascript:void();" + i18n-content="reload" + >RELOAD</a> + <span jsdisplay="enabled && allow_reload">-</span> + <a + jsvalues=".extensionId:id" jsdisplay="enabled" onclick="handleEnableExtension(this, false)" href="javascript:void();" @@ -708,14 +718,6 @@ function autoUpdate() { >ENABLE</a> - <a jsvalues=".extensionId:id" - jsdisplay="enabled" - onclick="handleReloadExtension(this)" - href="javascript:void();" - i18n-content="reload" - >RELOAD</a> - <span jsdisplay="enabled">-</span> - <a - jsvalues=".extensionId:id" onclick="handleUninstallExtension(this)" href="javascript:void();" i18n-content="uninstall" diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc index f6036dd..23c3402 100644 --- a/chrome/browser/views/browser_actions_container.cc +++ b/chrome/browser/views/browser_actions_container.cc @@ -294,8 +294,6 @@ void BrowserActionsContainer::RemoveBrowserAction(Extension* extension) { return; } } - - NOTREACHED() << "Asked to remove a browser action view that doesn't exist."; } void BrowserActionsContainer::DeleteBrowserActionViews() { diff --git a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json index e038286..eac2f95 100644 --- a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json +++ b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json @@ -5,6 +5,7 @@ "enabled": true, "description": "The first extension that I made.", "permissions": ["http://*.google.com/*", "https://*.google.com/*"], + "allow_reload": false, "order": 2, "content_scripts": [ { diff --git a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension2.json b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension2.json index e3c8b9d..d6a70f5 100644 --- a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension2.json +++ b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension2.json @@ -5,6 +5,7 @@ "enabled": true, "description": "", "permissions": [], + "allow_reload": false, "order": 2, "content_scripts": [], "views": [ diff --git a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension3.json b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension3.json index fa011fb..9235392 100644 --- a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension3.json +++ b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension3.json @@ -5,6 +5,7 @@ "enabled": true, "description": "", "permissions": [], + "allow_reload": false, "order": 2, "content_scripts": [ { |