summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extensions_ui.cc')
-rw-r--r--chrome/browser/extensions/extensions_ui.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index ffd2d04..73714f5 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -75,6 +75,8 @@ void ExtensionsDOMHandler::RegisterMessages() {
NewCallback(this, &ExtensionsDOMHandler::HandleRequestExtensionsData));
dom_ui_->RegisterMessageCallback("inspect",
NewCallback(this, &ExtensionsDOMHandler::HandleInspectMessage));
+ dom_ui_->RegisterMessageCallback("reload",
+ NewCallback(this, &ExtensionsDOMHandler::HandleReloadMessage));
dom_ui_->RegisterMessageCallback("uninstall",
NewCallback(this, &ExtensionsDOMHandler::HandleUninstallMessage));
}
@@ -127,6 +129,15 @@ void ExtensionsDOMHandler::HandleInspectMessage(const Value* value) {
DevToolsManager::GetInstance()->OpenDevToolsWindow(host);
}
+void ExtensionsDOMHandler::HandleReloadMessage(const Value* value) {
+ CHECK(value->IsType(Value::TYPE_LIST));
+ const ListValue* list = static_cast<const ListValue*>(value);
+ CHECK(list->GetSize() == 1);
+ std::string extension_id;
+ CHECK(list->GetString(0, &extension_id));
+ extensions_service_->ReloadExtension(extension_id);
+}
+
void ExtensionsDOMHandler::HandleUninstallMessage(const Value* value) {
CHECK(value->IsType(Value::TYPE_LIST));
const ListValue* list = static_cast<const ListValue*>(value);