OLD | NEW |
1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/options2/options_ui2.h" | 5 #include "chrome/browser/ui/webui/options2/options_ui2.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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.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/threading/thread.h" | 16 #include "base/threading/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/browser_about_handler.h" | 19 #include "chrome/browser/browser_about_handler.h" |
20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" | 22 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" |
23 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" | 23 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" |
24 #include "chrome/browser/ui/webui/options2/advanced_options_handler2.h" | |
25 #include "chrome/browser/ui/webui/options2/autofill_options_handler2.h" | 24 #include "chrome/browser/ui/webui/options2/autofill_options_handler2.h" |
26 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h" | 25 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h" |
27 #include "chrome/browser/ui/webui/options2/clear_browser_data_handler2.h" | 26 #include "chrome/browser/ui/webui/options2/clear_browser_data_handler2.h" |
28 #include "chrome/browser/ui/webui/options2/content_settings_handler2.h" | 27 #include "chrome/browser/ui/webui/options2/content_settings_handler2.h" |
29 #include "chrome/browser/ui/webui/options2/cookies_view_handler2.h" | 28 #include "chrome/browser/ui/webui/options2/cookies_view_handler2.h" |
30 #include "chrome/browser/ui/webui/options2/core_options_handler2.h" | 29 #include "chrome/browser/ui/webui/options2/core_options_handler2.h" |
31 #include "chrome/browser/ui/webui/options2/font_settings_handler2.h" | 30 #include "chrome/browser/ui/webui/options2/font_settings_handler2.h" |
32 #include "chrome/browser/ui/webui/options2/handler_options_handler2.h" | 31 #include "chrome/browser/ui/webui/options2/handler_options_handler2.h" |
33 #include "chrome/browser/ui/webui/options2/import_data_handler2.h" | 32 #include "chrome/browser/ui/webui/options2/import_data_handler2.h" |
34 #include "chrome/browser/ui/webui/options2/language_options_handler2.h" | 33 #include "chrome/browser/ui/webui/options2/language_options_handler2.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 164 |
166 CoreOptionsHandler* core_handler; | 165 CoreOptionsHandler* core_handler; |
167 #if defined(OS_CHROMEOS) | 166 #if defined(OS_CHROMEOS) |
168 core_handler = new chromeos::options2::CoreChromeOSOptionsHandler(); | 167 core_handler = new chromeos::options2::CoreChromeOSOptionsHandler(); |
169 #else | 168 #else |
170 core_handler = new CoreOptionsHandler(); | 169 core_handler = new CoreOptionsHandler(); |
171 #endif | 170 #endif |
172 core_handler->set_handlers_host(this); | 171 core_handler->set_handlers_host(this); |
173 AddOptionsPageUIHandler(localized_strings, core_handler); | 172 AddOptionsPageUIHandler(localized_strings, core_handler); |
174 | 173 |
175 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); | |
176 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); | 174 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); |
177 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); | 175 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); |
178 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 176 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
179 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 177 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
180 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 178 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
181 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 179 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
182 AddOptionsPageUIHandler(localized_strings, new WebIntentsSettingsHandler()); | 180 AddOptionsPageUIHandler(localized_strings, new WebIntentsSettingsHandler()); |
183 #if defined(OS_CHROMEOS) | 181 #if defined(OS_CHROMEOS) |
184 AddOptionsPageUIHandler(localized_strings, | 182 AddOptionsPageUIHandler(localized_strings, |
185 new chromeos::options2::CrosLanguageOptionsHandler()); | 183 new chromeos::options2::CrosLanguageOptionsHandler()); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 WideToASCII(CommandLine::ForCurrentProcess()->GetCommandLineString()); | 315 WideToASCII(CommandLine::ForCurrentProcess()->GetCommandLineString()); |
318 #else | 316 #else |
319 command_line_string = | 317 command_line_string = |
320 CommandLine::ForCurrentProcess()->GetCommandLineString(); | 318 CommandLine::ForCurrentProcess()->GetCommandLineString(); |
321 #endif | 319 #endif |
322 | 320 |
323 render_view_host->SetWebUIProperty("commandLineString", command_line_string); | 321 render_view_host->SetWebUIProperty("commandLineString", command_line_string); |
324 } | 322 } |
325 | 323 |
326 } // namespace options2 | 324 } // namespace options2 |
OLD | NEW |