OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/options_ui.h" | 5 #include "chrome/browser/dom_ui/options/options_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/dom_ui/options/clear_browser_data_handler.h" | 27 #include "chrome/browser/dom_ui/options/clear_browser_data_handler.h" |
28 #include "chrome/browser/dom_ui/options/content_settings_handler.h" | 28 #include "chrome/browser/dom_ui/options/content_settings_handler.h" |
29 #include "chrome/browser/dom_ui/options/cookies_view_handler.h" | 29 #include "chrome/browser/dom_ui/options/cookies_view_handler.h" |
30 #include "chrome/browser/dom_ui/options/core_options_handler.h" | 30 #include "chrome/browser/dom_ui/options/core_options_handler.h" |
31 #include "chrome/browser/dom_ui/options/font_settings_handler.h" | 31 #include "chrome/browser/dom_ui/options/font_settings_handler.h" |
32 #include "chrome/browser/dom_ui/options/import_data_handler.h" | 32 #include "chrome/browser/dom_ui/options/import_data_handler.h" |
33 #include "chrome/browser/dom_ui/options/language_options_handler.h" | 33 #include "chrome/browser/dom_ui/options/language_options_handler.h" |
34 #include "chrome/browser/dom_ui/options/password_manager_handler.h" | 34 #include "chrome/browser/dom_ui/options/password_manager_handler.h" |
35 #include "chrome/browser/dom_ui/options/personal_options_handler.h" | 35 #include "chrome/browser/dom_ui/options/personal_options_handler.h" |
36 #include "chrome/browser/dom_ui/options/search_engine_manager_handler.h" | 36 #include "chrome/browser/dom_ui/options/search_engine_manager_handler.h" |
37 #include "chrome/browser/dom_ui/options/startup_page_manager_handler.h" | |
38 #include "chrome/browser/dom_ui/options/stop_syncing_handler.h" | 37 #include "chrome/browser/dom_ui/options/stop_syncing_handler.h" |
39 #include "chrome/browser/metrics/user_metrics.h" | 38 #include "chrome/browser/metrics/user_metrics.h" |
40 #include "chrome/browser/renderer_host/render_view_host.h" | 39 #include "chrome/browser/renderer_host/render_view_host.h" |
41 #include "chrome/browser/profiles/profile.h" | 40 #include "chrome/browser/profiles/profile.h" |
42 #include "chrome/browser/tab_contents/tab_contents.h" | 41 #include "chrome/browser/tab_contents/tab_contents.h" |
43 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 42 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
44 #include "chrome/common/jstemplate_builder.h" | 43 #include "chrome/common/jstemplate_builder.h" |
45 #include "chrome/common/notification_type.h" | 44 #include "chrome/common/notification_type.h" |
46 #include "chrome/common/time_format.h" | 45 #include "chrome/common/time_format.h" |
47 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 AddOptionsPageUIHandler(localized_strings, new AutoFillOptionsHandler()); | 150 AddOptionsPageUIHandler(localized_strings, new AutoFillOptionsHandler()); |
152 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); | 151 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); |
153 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 152 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
154 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 153 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
155 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 154 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
156 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 155 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
157 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 156 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
158 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 157 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
159 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); | 158 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); |
160 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 159 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
161 AddOptionsPageUIHandler(localized_strings, new StartupPageManagerHandler()); | |
162 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); | 160 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); |
163 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); | 161 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); |
164 #if defined(OS_CHROMEOS) | 162 #if defined(OS_CHROMEOS) |
165 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler()); | 163 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler()); |
166 AddOptionsPageUIHandler(localized_strings, | 164 AddOptionsPageUIHandler(localized_strings, |
167 new chromeos::AccountsOptionsHandler()); | 165 new chromeos::AccountsOptionsHandler()); |
168 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); | 166 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); |
169 AddOptionsPageUIHandler(localized_strings, | 167 AddOptionsPageUIHandler(localized_strings, |
170 new chromeos::LanguageChewingOptionsHandler()); | 168 new chromeos::LanguageChewingOptionsHandler()); |
171 AddOptionsPageUIHandler(localized_strings, | 169 AddOptionsPageUIHandler(localized_strings, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 OptionsPageUIHandler* handler_raw) { | 276 OptionsPageUIHandler* handler_raw) { |
279 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); | 277 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); |
280 DCHECK(handler.get()); | 278 DCHECK(handler.get()); |
281 // Add only if handler's service is enabled. | 279 // Add only if handler's service is enabled. |
282 if (handler->IsEnabled()) { | 280 if (handler->IsEnabled()) { |
283 handler->GetLocalizedValues(localized_strings); | 281 handler->GetLocalizedValues(localized_strings); |
284 // Add handler to the list and also pass the ownership. | 282 // Add handler to the list and also pass the ownership. |
285 AddMessageHandler(handler.release()->Attach(this)); | 283 AddMessageHandler(handler.release()->Attach(this)); |
286 } | 284 } |
287 } | 285 } |
OLD | NEW |