| 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/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" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler2.h" | 72 #include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler2.h" |
| 73 #include "chrome/browser/ui/webui/options2/chromeos/system_options_handler2.h" | 73 #include "chrome/browser/ui/webui/options2/chromeos/system_options_handler2.h" |
| 74 #include "chrome/browser/ui/webui/options2/chromeos/user_image_source2.h" | 74 #include "chrome/browser/ui/webui/options2/chromeos/user_image_source2.h" |
| 75 #include "chrome/browser/ui/webui/options2/chromeos/virtual_keyboard_manager_han
dler2.h" | 75 #include "chrome/browser/ui/webui/options2/chromeos/virtual_keyboard_manager_han
dler2.h" |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 #if defined(USE_NSS) | 78 #if defined(USE_NSS) |
| 79 #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h" | 79 #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h" |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 using content::WebContents; |
| 83 |
| 82 namespace options2 { | 84 namespace options2 { |
| 83 | 85 |
| 84 static const char kLocalizedStringsFile[] = "strings.js"; | 86 static const char kLocalizedStringsFile[] = "strings.js"; |
| 85 static const char kOptionsBundleJsFile[] = "options_bundle.js"; | 87 static const char kOptionsBundleJsFile[] = "options_bundle.js"; |
| 86 | 88 |
| 87 //////////////////////////////////////////////////////////////////////////////// | 89 //////////////////////////////////////////////////////////////////////////////// |
| 88 // | 90 // |
| 89 // OptionsUIHTMLSource | 91 // OptionsUIHTMLSource |
| 90 // | 92 // |
| 91 //////////////////////////////////////////////////////////////////////////////// | 93 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE), | 188 l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE), |
| 187 l10n_util::GetStringUTF16(title_id))); | 189 l10n_util::GetStringUTF16(title_id))); |
| 188 } | 190 } |
| 189 | 191 |
| 190 //////////////////////////////////////////////////////////////////////////////// | 192 //////////////////////////////////////////////////////////////////////////////// |
| 191 // | 193 // |
| 192 // OptionsUI | 194 // OptionsUI |
| 193 // | 195 // |
| 194 //////////////////////////////////////////////////////////////////////////////// | 196 //////////////////////////////////////////////////////////////////////////////// |
| 195 | 197 |
| 196 OptionsUI::OptionsUI(TabContents* contents) | 198 OptionsUI::OptionsUI(WebContents* contents) |
| 197 : ChromeWebUI(contents), | 199 : ChromeWebUI(contents), |
| 198 initialized_handlers_(false) { | 200 initialized_handlers_(false) { |
| 199 DictionaryValue* localized_strings = new DictionaryValue(); | 201 DictionaryValue* localized_strings = new DictionaryValue(); |
| 200 | 202 |
| 201 CoreOptionsHandler* core_handler; | 203 CoreOptionsHandler* core_handler; |
| 202 #if defined(OS_CHROMEOS) | 204 #if defined(OS_CHROMEOS) |
| 203 core_handler = new chromeos::options2::CoreChromeOSOptionsHandler(); | 205 core_handler = new chromeos::options2::CoreChromeOSOptionsHandler(); |
| 204 #else | 206 #else |
| 205 core_handler = new CoreOptionsHandler(); | 207 core_handler = new CoreOptionsHandler(); |
| 206 #endif | 208 #endif |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 WideToASCII(CommandLine::ForCurrentProcess()->GetCommandLineString()); | 364 WideToASCII(CommandLine::ForCurrentProcess()->GetCommandLineString()); |
| 363 #else | 365 #else |
| 364 command_line_string = | 366 command_line_string = |
| 365 CommandLine::ForCurrentProcess()->GetCommandLineString(); | 367 CommandLine::ForCurrentProcess()->GetCommandLineString(); |
| 366 #endif | 368 #endif |
| 367 | 369 |
| 368 render_view_host->SetWebUIProperty("commandLineString", command_line_string); | 370 render_view_host->SetWebUIProperty("commandLineString", command_line_string); |
| 369 } | 371 } |
| 370 | 372 |
| 371 } // namespace options2 | 373 } // namespace options2 |
| OLD | NEW |