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/ui/webui/options/options_ui.h" | 5 #include "chrome/browser/ui/webui/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 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/ui/webui/options/advanced_options_handler.h" | 21 #include "chrome/browser/ui/webui/options/advanced_options_handler.h" |
22 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" | 22 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" |
23 #include "chrome/browser/ui/webui/options/browser_options_handler.h" | 23 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
24 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" | 24 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" |
25 #include "chrome/browser/ui/webui/options/content_settings_handler.h" | 25 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
26 #include "chrome/browser/ui/webui/options/handler_options_handler.h" | 26 #include "chrome/browser/ui/webui/options/handler_options_handler.h" |
27 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" | 27 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" |
28 #include "chrome/browser/ui/webui/options/core_options_handler.h" | 28 #include "chrome/browser/ui/webui/options/core_options_handler.h" |
29 #include "chrome/browser/ui/webui/options/font_settings_handler.h" | 29 #include "chrome/browser/ui/webui/options/font_settings_handler.h" |
30 #include "chrome/browser/ui/webui/options/import_data_handler.h" | 30 #include "chrome/browser/ui/webui/options/import_data_handler.h" |
| 31 #include "chrome/browser/ui/webui/options/intents_settings_handler.h" |
31 #include "chrome/browser/ui/webui/options/language_options_handler.h" | 32 #include "chrome/browser/ui/webui/options/language_options_handler.h" |
32 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" | 33 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" |
33 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" | 34 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" |
34 #include "chrome/browser/ui/webui/options/password_manager_handler.h" | 35 #include "chrome/browser/ui/webui/options/password_manager_handler.h" |
35 #include "chrome/browser/ui/webui/options/personal_options_handler.h" | 36 #include "chrome/browser/ui/webui/options/personal_options_handler.h" |
36 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" | 37 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" |
37 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" | 38 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" |
38 #include "chrome/browser/ui/webui/theme_source.h" | 39 #include "chrome/browser/ui/webui/theme_source.h" |
39 #include "chrome/common/jstemplate_builder.h" | 40 #include "chrome/common/jstemplate_builder.h" |
40 #include "chrome/common/time_format.h" | 41 #include "chrome/common/time_format.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 core_handler->set_handlers_host(this); | 203 core_handler->set_handlers_host(this); |
203 AddOptionsPageUIHandler(localized_strings, core_handler); | 204 AddOptionsPageUIHandler(localized_strings, core_handler); |
204 | 205 |
205 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); | 206 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); |
206 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); | 207 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); |
207 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); | 208 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); |
208 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 209 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
209 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 210 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
210 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 211 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
211 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 212 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
| 213 AddOptionsPageUIHandler(localized_strings, new IntentsSettingsHandler()); |
212 #if defined(OS_CHROMEOS) | 214 #if defined(OS_CHROMEOS) |
213 AddOptionsPageUIHandler(localized_strings, | 215 AddOptionsPageUIHandler(localized_strings, |
214 new chromeos::CrosLanguageOptionsHandler()); | 216 new chromeos::CrosLanguageOptionsHandler()); |
215 #else | 217 #else |
216 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 218 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
217 #endif | 219 #endif |
218 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); | 220 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); |
219 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 221 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
220 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); | 222 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); |
221 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 223 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 OptionsPageUIHandler* handler_raw) { | 338 OptionsPageUIHandler* handler_raw) { |
337 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); | 339 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); |
338 DCHECK(handler.get()); | 340 DCHECK(handler.get()); |
339 // Add only if handler's service is enabled. | 341 // Add only if handler's service is enabled. |
340 if (handler->IsEnabled()) { | 342 if (handler->IsEnabled()) { |
341 handler->GetLocalizedValues(localized_strings); | 343 handler->GetLocalizedValues(localized_strings); |
342 // Add handler to the list and also pass the ownership. | 344 // Add handler to the list and also pass the ownership. |
343 AddMessageHandler(handler.release()->Attach(this)); | 345 AddMessageHandler(handler.release()->Attach(this)); |
344 } | 346 } |
345 } | 347 } |
OLD | NEW |