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

Side by Side Diff: chrome/browser/dom_ui/options_ui.cc

Issue 3044047: DOMUI: Base framework for the AutoFill page. (Closed)
Patch Set: Fix missing handler. Created 10 years, 4 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/dom_ui/options_ui.h" 5 #include "chrome/browser/dom_ui/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/i18n/time_formatting.h" 11 #include "base/i18n/time_formatting.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/singleton.h" 13 #include "base/singleton.h"
14 #include "base/string_piece.h" 14 #include "base/string_piece.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "base/thread.h" 16 #include "base/thread.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "chrome/browser/chrome_thread.h" 19 #include "chrome/browser/chrome_thread.h"
20 #include "chrome/browser/dom_ui/add_startup_page_handler.h" 20 #include "chrome/browser/dom_ui/add_startup_page_handler.h"
21 #include "chrome/browser/dom_ui/advanced_options_handler.h" 21 #include "chrome/browser/dom_ui/advanced_options_handler.h"
22 #include "chrome/browser/dom_ui/autofill_options_handler.h"
22 #include "chrome/browser/dom_ui/browser_options_handler.h" 23 #include "chrome/browser/dom_ui/browser_options_handler.h"
23 #include "chrome/browser/dom_ui/clear_browser_data_handler.h" 24 #include "chrome/browser/dom_ui/clear_browser_data_handler.h"
24 #include "chrome/browser/dom_ui/content_settings_handler.h" 25 #include "chrome/browser/dom_ui/content_settings_handler.h"
25 #include "chrome/browser/dom_ui/core_options_handler.h" 26 #include "chrome/browser/dom_ui/core_options_handler.h"
27 #include "chrome/browser/dom_ui/dom_ui_theme_source.h"
26 #include "chrome/browser/dom_ui/font_settings_handler.h" 28 #include "chrome/browser/dom_ui/font_settings_handler.h"
27 #include "chrome/browser/dom_ui/import_data_handler.h" 29 #include "chrome/browser/dom_ui/import_data_handler.h"
28 #include "chrome/browser/dom_ui/passwords_exceptions_handler.h" 30 #include "chrome/browser/dom_ui/passwords_exceptions_handler.h"
29 #include "chrome/browser/dom_ui/personal_options_handler.h" 31 #include "chrome/browser/dom_ui/personal_options_handler.h"
30 #include "chrome/browser/dom_ui/search_engine_manager_handler.h" 32 #include "chrome/browser/dom_ui/search_engine_manager_handler.h"
31 #include "chrome/browser/dom_ui/stop_syncing_handler.h" 33 #include "chrome/browser/dom_ui/stop_syncing_handler.h"
32 #include "chrome/browser/dom_ui/sync_options_handler.h" 34 #include "chrome/browser/dom_ui/sync_options_handler.h"
33 #include "chrome/browser/dom_ui/dom_ui_theme_source.h"
34 #include "chrome/browser/metrics/user_metrics.h" 35 #include "chrome/browser/metrics/user_metrics.h"
35 #include "chrome/browser/pref_service.h" 36 #include "chrome/browser/pref_service.h"
36 #include "chrome/browser/profile.h" 37 #include "chrome/browser/profile.h"
37 #include "chrome/browser/tab_contents/tab_contents.h" 38 #include "chrome/browser/tab_contents/tab_contents.h"
38 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 39 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
39 #include "chrome/common/jstemplate_builder.h" 40 #include "chrome/common/jstemplate_builder.h"
40 #include "chrome/common/notification_service.h" 41 #include "chrome/common/notification_service.h"
41 #include "chrome/common/notification_type.h" 42 #include "chrome/common/notification_type.h"
42 #include "chrome/common/time_format.h" 43 #include "chrome/common/time_format.h"
43 #include "chrome/common/url_constants.h" 44 #include "chrome/common/url_constants.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 124
124 #if defined(OS_CHROMEOS) 125 #if defined(OS_CHROMEOS)
125 AddOptionsPageUIHandler(localized_strings, 126 AddOptionsPageUIHandler(localized_strings,
126 new chromeos::CoreChromeOSOptionsHandler()); 127 new chromeos::CoreChromeOSOptionsHandler());
127 #else 128 #else
128 AddOptionsPageUIHandler(localized_strings, new CoreOptionsHandler()); 129 AddOptionsPageUIHandler(localized_strings, new CoreOptionsHandler());
129 #endif 130 #endif
130 131
131 AddOptionsPageUIHandler(localized_strings, new AddStartupPageHandler()); 132 AddOptionsPageUIHandler(localized_strings, new AddStartupPageHandler());
132 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); 133 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler());
134 AddOptionsPageUIHandler(localized_strings, new AutoFillOptionsHandler());
133 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); 135 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler());
134 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); 136 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler());
135 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); 137 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
136 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); 138 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler());
137 AddOptionsPageUIHandler(localized_strings, new PasswordsExceptionsHandler()); 139 AddOptionsPageUIHandler(localized_strings, new PasswordsExceptionsHandler());
138 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); 140 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler());
139 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); 141 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler());
140 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); 142 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler());
141 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); 143 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler());
142 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); 144 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); 197 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize();
196 } 198 }
197 } 199 }
198 200
199 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, 201 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,
200 OptionsPageUIHandler* handler) { 202 OptionsPageUIHandler* handler) {
201 DCHECK(handler); 203 DCHECK(handler);
202 handler->GetLocalizedValues(localized_strings); 204 handler->GetLocalizedValues(localized_strings);
203 AddMessageHandler(handler->Attach(this)); 205 AddMessageHandler(handler->Attach(this));
204 } 206 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/autofill_options_handler.cc ('k') | chrome/browser/resources/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698