Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5866)

Unified Diff: chrome/browser/extensions/extensions_ui.cc

Issue 159323: Make possible restarting extensions from the chrome://extensions/ page.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extensions_ui.h ('k') | chrome/browser/resources/extensions_ui.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_ui.cc
===================================================================
--- chrome/browser/extensions/extensions_ui.cc (revision 21643)
+++ chrome/browser/extensions/extensions_ui.cc (working copy)
@@ -75,6 +75,8 @@
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 @@
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);
« no previous file with comments | « chrome/browser/extensions/extensions_ui.h ('k') | chrome/browser/resources/extensions_ui.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698