| 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" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h" | 68 #include "chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h" |
| 69 #include "chrome/browser/ui/webui/options2/chromeos/keyboard_handler2.h" | 69 #include "chrome/browser/ui/webui/options2/chromeos/keyboard_handler2.h" |
| 70 #include "chrome/browser/ui/webui/options2/chromeos/language_chewing_handler2.h" | 70 #include "chrome/browser/ui/webui/options2/chromeos/language_chewing_handler2.h" |
| 71 #include "chrome/browser/ui/webui/options2/chromeos/language_hangul_handler2.h" | 71 #include "chrome/browser/ui/webui/options2/chromeos/language_hangul_handler2.h" |
| 72 #include "chrome/browser/ui/webui/options2/chromeos/language_mozc_handler2.h" | 72 #include "chrome/browser/ui/webui/options2/chromeos/language_mozc_handler2.h" |
| 73 #include "chrome/browser/ui/webui/options2/chromeos/language_pinyin_handler2.h" | 73 #include "chrome/browser/ui/webui/options2/chromeos/language_pinyin_handler2.h" |
| 74 #include "chrome/browser/ui/webui/options2/chromeos/pointer_handler2.h" | 74 #include "chrome/browser/ui/webui/options2/chromeos/pointer_handler2.h" |
| 75 #include "chrome/browser/ui/webui/options2/chromeos/proxy_handler2.h" | 75 #include "chrome/browser/ui/webui/options2/chromeos/proxy_handler2.h" |
| 76 #include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler2.h" | 76 #include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler2.h" |
| 77 #include "chrome/browser/ui/webui/options2/chromeos/user_image_source2.h" | 77 #include "chrome/browser/ui/webui/options2/chromeos/user_image_source2.h" |
| 78 #include "chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source2.
h" |
| 78 #if defined(USE_VIRTUAL_KEYBOARD) | 79 #if defined(USE_VIRTUAL_KEYBOARD) |
| 79 #include "chrome/browser/ui/webui/options2/chromeos/virtual_keyboard_manager_han
dler2.h" | 80 #include "chrome/browser/ui/webui/options2/chromeos/virtual_keyboard_manager_han
dler2.h" |
| 80 #endif | 81 #endif |
| 81 #endif | 82 #endif |
| 82 | 83 |
| 83 #if defined(OS_CHROMEOS) && defined(USE_ASH) | 84 #if defined(OS_CHROMEOS) && defined(USE_ASH) |
| 84 #include "chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handle
r2.h" | 85 #include "chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handle
r2.h" |
| 85 #endif | 86 #endif |
| 86 | 87 |
| 87 #if defined(USE_NSS) | 88 #if defined(USE_NSS) |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 303 |
| 303 // Set up the chrome://theme/ source. | 304 // Set up the chrome://theme/ source. |
| 304 ThemeSource* theme = new ThemeSource(profile); | 305 ThemeSource* theme = new ThemeSource(profile); |
| 305 profile->GetChromeURLDataManager()->AddDataSource(theme); | 306 profile->GetChromeURLDataManager()->AddDataSource(theme); |
| 306 | 307 |
| 307 #if defined(OS_CHROMEOS) | 308 #if defined(OS_CHROMEOS) |
| 308 // Set up the chrome://userimage/ source. | 309 // Set up the chrome://userimage/ source. |
| 309 chromeos::options2::UserImageSource* user_image_source = | 310 chromeos::options2::UserImageSource* user_image_source = |
| 310 new chromeos::options2::UserImageSource(); | 311 new chromeos::options2::UserImageSource(); |
| 311 profile->GetChromeURLDataManager()->AddDataSource(user_image_source); | 312 profile->GetChromeURLDataManager()->AddDataSource(user_image_source); |
| 313 // Set up the chrome://wallpaper/ source. |
| 314 chromeos::options2::WallpaperThumbnailSource* wallpaper_thumbnail_source = |
| 315 new chromeos::options2::WallpaperThumbnailSource(); |
| 316 profile->GetChromeURLDataManager()-> |
| 317 AddDataSource(wallpaper_thumbnail_source); |
| 312 | 318 |
| 313 pointer_device_observer_.reset( | 319 pointer_device_observer_.reset( |
| 314 new chromeos::system::PointerDeviceObserver()); | 320 new chromeos::system::PointerDeviceObserver()); |
| 315 pointer_device_observer_->AddObserver(browser_options_handler); | 321 pointer_device_observer_->AddObserver(browser_options_handler); |
| 316 pointer_device_observer_->AddObserver(pointer_handler); | 322 pointer_device_observer_->AddObserver(pointer_handler); |
| 317 #endif | 323 #endif |
| 318 } | 324 } |
| 319 | 325 |
| 320 OptionsUI::~OptionsUI() { | 326 OptionsUI::~OptionsUI() { |
| 321 // Uninitialize all registered handlers. Deleted by WebUIImpl. | 327 // Uninitialize all registered handlers. Deleted by WebUIImpl. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 WideToASCII(CommandLine::ForCurrentProcess()->GetCommandLineString()); | 419 WideToASCII(CommandLine::ForCurrentProcess()->GetCommandLineString()); |
| 414 #else | 420 #else |
| 415 command_line_string = | 421 command_line_string = |
| 416 CommandLine::ForCurrentProcess()->GetCommandLineString(); | 422 CommandLine::ForCurrentProcess()->GetCommandLineString(); |
| 417 #endif | 423 #endif |
| 418 | 424 |
| 419 render_view_host->SetWebUIProperty("commandLineString", command_line_string); | 425 render_view_host->SetWebUIProperty("commandLineString", command_line_string); |
| 420 } | 426 } |
| 421 | 427 |
| 422 } // namespace options2 | 428 } // namespace options2 |
| OLD | NEW |