From 2bc2de68e5961170980496f79d4b89a9956b3b49 Mon Sep 17 00:00:00 2001 From: "tim@chromium.org" Date: Mon, 29 Jun 2009 23:37:42 +0000 Subject: Take two for http://codereview.chromium.org/131094 This time without browser_tests timeout that caused the revert. The problem was BrowsingHistoryHandler trying to use a dom_ui_ before being attached. Review URL: http://codereview.chromium.org/149117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19556 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extensions_ui.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'chrome/browser/extensions/extensions_ui.cc') diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index 6f08479..7ad40cc 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -62,9 +62,12 @@ void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path, // /////////////////////////////////////////////////////////////////////////////// -ExtensionsDOMHandler::ExtensionsDOMHandler(DOMUI* dom_ui, - ExtensionsService* extension_service) - : DOMMessageHandler(dom_ui), extensions_service_(extension_service) { +ExtensionsDOMHandler::ExtensionsDOMHandler( + ExtensionsService* extension_service) + : extensions_service_(extension_service) { + } + +void ExtensionsDOMHandler::RegisterMessages() { dom_ui_->RegisterMessageCallback("requestExtensionsData", NewCallback(this, &ExtensionsDOMHandler::HandleRequestExtensionsData)); dom_ui_->RegisterMessageCallback("inspect", @@ -257,17 +260,13 @@ ExtensionsDOMHandler::~ExtensionsDOMHandler() { // ExtensionsDOMHandler, public: ----------------------------------------------- -void ExtensionsDOMHandler::Init() { -} - ExtensionsUI::ExtensionsUI(TabContents* contents) : DOMUI(contents) { ExtensionsService *exstension_service = GetProfile()->GetOriginalProfile()->GetExtensionsService(); - ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(this, - exstension_service); + ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); AddMessageHandler(handler); - handler->Init(); + handler->Attach(this); ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); -- cgit v1.1