| 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/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #include "third_party/skia/include/core/SkBitmap.h" | 78 #include "third_party/skia/include/core/SkBitmap.h" |
| 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 80 #include "ui/base/l10n/l10n_util.h" | 80 #include "ui/base/l10n/l10n_util.h" |
| 81 | 81 |
| 82 #if !defined(OS_CHROMEOS) | 82 #if !defined(OS_CHROMEOS) |
| 83 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 83 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
| 84 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" | 84 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" |
| 85 #endif | 85 #endif |
| 86 | 86 |
| 87 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
| 88 #include "ash/magnifier/magnifier_constants.h" |
| 88 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 89 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 89 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" | 90 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" |
| 90 #include "chrome/browser/chromeos/login/user_manager.h" | 91 #include "chrome/browser/chromeos/login/user_manager.h" |
| 91 #include "chrome/browser/chromeos/settings/cros_settings.h" | 92 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 92 #include "chrome/browser/policy/browser_policy_connector.h" | 93 #include "chrome/browser/policy/browser_policy_connector.h" |
| 93 #include "chrome/browser/ui/browser_window.h" | 94 #include "chrome/browser/ui/browser_window.h" |
| 94 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" | 95 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" |
| 95 #include "chromeos/dbus/dbus_thread_manager.h" | 96 #include "chromeos/dbus/dbus_thread_manager.h" |
| 96 #include "chromeos/dbus/power_manager_client.h" | 97 #include "chromeos/dbus/power_manager_client.h" |
| 97 #include "ui/gfx/image/image_skia.h" | 98 #include "ui/gfx/image/image_skia.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 421 |
| 421 #if defined(OS_CHROMEOS) | 422 #if defined(OS_CHROMEOS) |
| 422 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL); | 423 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL); |
| 423 | 424 |
| 424 // TODO(pastarmovj): replace this with a call to the CrosSettings list | 425 // TODO(pastarmovj): replace this with a call to the CrosSettings list |
| 425 // handling functionality to come. | 426 // handling functionality to come. |
| 426 values->Set("timezoneList", GetTimezoneList().release()); | 427 values->Set("timezoneList", GetTimezoneList().release()); |
| 427 | 428 |
| 428 values->SetString("accessibilityLearnMoreURL", | 429 values->SetString("accessibilityLearnMoreURL", |
| 429 chrome::kChromeAccessibilityHelpURL); | 430 chrome::kChromeAccessibilityHelpURL); |
| 431 |
| 432 // Creates magnifierList. |
| 433 base::ListValue* magnifierList = new base::ListValue(); |
| 434 base::ListValue* option_full = new base::ListValue(); |
| 435 option_full->Append(base::Value::CreateIntegerValue(ash::MAGNIFIER_FULL)); |
| 436 option_full->Append(new base::StringValue(l10n_util::GetStringUTF16( |
| 437 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_FULL))); |
| 438 base::ListValue* option_partial = new base::ListValue(); |
| 439 option_partial->Append(base::Value::CreateIntegerValue( |
| 440 ash::MAGNIFIER_PARTIAL)); |
| 441 option_partial->Append(new base::StringValue(l10n_util::GetStringUTF16( |
| 442 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL))); |
| 443 magnifierList->Append(option_full); |
| 444 magnifierList->Append(option_partial); |
| 445 values->Set("magnifierList", magnifierList); |
| 446 |
| 430 #endif | 447 #endif |
| 431 #if defined(OS_MACOSX) | 448 #if defined(OS_MACOSX) |
| 432 values->SetString("macPasswordsWarning", | 449 values->SetString("macPasswordsWarning", |
| 433 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); | 450 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); |
| 434 values->SetBoolean("multiple_profiles", | 451 values->SetBoolean("multiple_profiles", |
| 435 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); | 452 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); |
| 436 #endif | 453 #endif |
| 437 | 454 |
| 438 if (multiprofile_) | 455 if (multiprofile_) |
| 439 values->Set("profilesInfo", GetProfilesInfoList().release()); | 456 values->Set("profilesInfo", GetProfilesInfoList().release()); |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 1431 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 1415 } | 1432 } |
| 1416 StringValue label(label_str); | 1433 StringValue label(label_str); |
| 1417 | 1434 |
| 1418 web_ui()->CallJavascriptFunction( | 1435 web_ui()->CallJavascriptFunction( |
| 1419 "BrowserOptions.setupProxySettingsSection", disabled, label); | 1436 "BrowserOptions.setupProxySettingsSection", disabled, label); |
| 1420 #endif // !defined(OS_CHROMEOS) | 1437 #endif // !defined(OS_CHROMEOS) |
| 1421 } | 1438 } |
| 1422 | 1439 |
| 1423 } // namespace options | 1440 } // namespace options |
| OLD | NEW |