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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
(...skipping 12 matching lines...) Expand all
24 public: 24 public:
25 OptionsPageUIHandler(); 25 OptionsPageUIHandler();
26 virtual ~OptionsPageUIHandler(); 26 virtual ~OptionsPageUIHandler();
27 27
28 // Is this handler enabled? 28 // Is this handler enabled?
29 virtual bool IsEnabled(); 29 virtual bool IsEnabled();
30 30
31 // Collects localized strings for options page. 31 // Collects localized strings for options page.
32 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0; 32 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0;
33 33
34 // Initialize the page. Called once the DOM is available for manipulation. 34 // Will be called only once in the life time of the handler. Generally used to
35 // This will be called only once. 35 // add observers, initializes preferences, or start asynchronous calls from
36 virtual void Initialize() {} 36 // various services.
37 virtual void InitializeHandler() {}
38
39 // Initialize the page. Called once the DOM is available for manipulation.
40 // This will be called when a RenderView is re-used (when navigated to with
41 // back/forward or session restored in some cases) or when created.
42 virtual void InitializePage() {}
37 43
38 // Uninitializes the page. Called just before the object is destructed. 44 // Uninitializes the page. Called just before the object is destructed.
39 virtual void Uninitialize() {} 45 virtual void Uninitialize() {}
40 46
41 // WebUIMessageHandler implementation. 47 // WebUIMessageHandler implementation.
42 virtual void RegisterMessages() OVERRIDE {} 48 virtual void RegisterMessages() OVERRIDE {}
43 49
44 // content::NotificationObserver implementation. 50 // content::NotificationObserver implementation.
45 virtual void Observe(int type, 51 virtual void Observe(int type,
46 const content::NotificationSource& source, 52 const content::NotificationSource& source,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void SetCommandLineString(content::RenderViewHost* render_view_host); 114 void SetCommandLineString(content::RenderViewHost* render_view_host);
109 115
110 bool initialized_handlers_; 116 bool initialized_handlers_;
111 117
112 std::vector<OptionsPageUIHandler*> handlers_; 118 std::vector<OptionsPageUIHandler*> handlers_;
113 119
114 DISALLOW_COPY_AND_ASSIGN(OptionsUI); 120 DISALLOW_COPY_AND_ASSIGN(OptionsUI);
115 }; 121 };
116 122
117 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ 123 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_
OLDNEW
« 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