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

Unified Diff: chrome/browser/ui/webui/options/options_ui.h

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros compile fix, still issues Created 8 years, 9 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/options/options_ui.h
diff --git a/chrome/browser/ui/webui/options/options_ui.h b/chrome/browser/ui/webui/options/options_ui.h
index 3e6c10da0a8516ef0c05c0e8a5a03bc5bc783231..8301270fb40b9ca326e03fbbe3f8f546ddae7c86 100644
--- a/chrome/browser/ui/webui/options/options_ui.h
+++ b/chrome/browser/ui/webui/options/options_ui.h
@@ -31,9 +31,15 @@ class OptionsPageUIHandler : public content::WebUIMessageHandler,
// Collects localized strings for options page.
virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0;
- // Initialize the page. Called once the DOM is available for manipulation.
- // This will be called only once.
- virtual void Initialize() {}
+ // Will be called only once in the life time of the handler. Generally used to
+ // add observers, initializes preferences, or start asynchronous calls from
+ // various services.
+ virtual void InitializeHandler() {}
+
+ // Initialize the page. Called once the DOM is available for manipulation.
+ // This will be called when a RenderView is re-used (when navigated to with
+ // back/forward or session restored in some cases) or when created.
+ virtual void InitializePage() {}
// Uninitializes the page. Called just before the object is destructed.
virtual void Uninitialize() {}

Powered by Google App Engine
This is Rietveld 408576698