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

Unified Diff: chrome/browser/ui/webui/options2/options_ui2.cc

Issue 9994005: Separate handler initialization from page initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: estade review Created 8 years, 8 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
Index: chrome/browser/ui/webui/options2/options_ui2.cc
diff --git a/chrome/browser/ui/webui/options2/options_ui2.cc b/chrome/browser/ui/webui/options2/options_ui2.cc
index 50b39003a501954062d9667c53d958b3404f6ae2..3db69d3ba0806d369e1ef6f1e250b6b19a57aeb7 100644
--- a/chrome/browser/ui/webui/options2/options_ui2.cc
+++ b/chrome/browser/ui/webui/options2/options_ui2.cc
@@ -310,6 +310,8 @@ OptionsUI::OptionsUI(content::WebUI* web_ui)
pointer_device_observer_->AddObserver(browser_options_handler);
pointer_device_observer_->AddObserver(pointer_handler);
#endif
+
+ InitializeHandlers();
Dan Beam 2012/04/05 21:38:21 We could also simply call handler->InitializeHandl
}
OptionsUI::~OptionsUI() {
@@ -377,14 +379,16 @@ void OptionsUI::InitializeHandlers() {
initialized_handlers_ = true;
}
+#if defined(OS_CHROMEOS)
+ pointer_device_observer_->Init();
+#endif
+}
+
+void OptionsUI::InitializePages() {
// Always initialize the page as when handlers are left over we still need to
// do various things like show/hide sections and send data to the Javascript.
for (size_t i = 0; i < handlers_.size(); ++i)
handlers_[i]->InitializePage();
-
-#if defined(OS_CHROMEOS)
- pointer_device_observer_->Init();
-#endif
}
void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,

Powered by Google App Engine
This is Rietveld 408576698