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

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: copyright bumps 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..82b65c77c6b51cac72e220bfb88073d3eebe4f96 100644
--- a/chrome/browser/ui/webui/options/options_ui.h
+++ b/chrome/browser/ui/webui/options/options_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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() {}
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.cc ('k') | chrome/browser/ui/webui/options/options_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698