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 <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" | 103 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" |
104 #endif | 104 #endif |
105 | 105 |
106 #if defined(OS_CHROMEOS) | 106 #if defined(OS_CHROMEOS) |
107 #include "ash/ash_switches.h" | 107 #include "ash/ash_switches.h" |
108 #include "ash/desktop_background/user_wallpaper_delegate.h" | 108 #include "ash/desktop_background/user_wallpaper_delegate.h" |
109 #include "ash/shell.h" | 109 #include "ash/shell.h" |
110 #include "chrome/browser/browser_process_platform_part.h" | 110 #include "chrome/browser/browser_process_platform_part.h" |
111 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 111 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
112 #include "chrome/browser/chromeos/chromeos_utils.h" | 112 #include "chrome/browser/chromeos/chromeos_utils.h" |
| 113 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
113 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 114 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
114 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 115 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
115 #include "chrome/browser/chromeos/reset/metrics.h" | 116 #include "chrome/browser/chromeos/reset/metrics.h" |
116 #include "chrome/browser/chromeos/settings/cros_settings.h" | 117 #include "chrome/browser/chromeos/settings/cros_settings.h" |
117 #include "chrome/browser/chromeos/system/timezone_util.h" | 118 #include "chrome/browser/chromeos/system/timezone_util.h" |
118 #include "chrome/browser/policy/profile_policy_connector.h" | 119 #include "chrome/browser/policy/profile_policy_connector.h" |
119 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 120 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
120 #include "chrome/browser/ui/browser_window.h" | 121 #include "chrome/browser/ui/browser_window.h" |
121 #include "chromeos/dbus/dbus_thread_manager.h" | 122 #include "chromeos/dbus/dbus_thread_manager.h" |
122 #include "chromeos/dbus/power_manager_client.h" | 123 #include "chromeos/dbus/power_manager_client.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 { "translateEnableTranslate", | 365 { "translateEnableTranslate", |
365 IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE }, | 366 IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE }, |
366 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 367 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
367 { "showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS }, | 368 { "showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS }, |
368 { "themesNativeButton", IDS_THEMES_GTK_BUTTON }, | 369 { "themesNativeButton", IDS_THEMES_GTK_BUTTON }, |
369 { "themesSetClassic", IDS_THEMES_SET_CLASSIC }, | 370 { "themesSetClassic", IDS_THEMES_SET_CLASSIC }, |
370 #else | 371 #else |
371 { "themes", IDS_THEMES_GROUP_NAME }, | 372 { "themes", IDS_THEMES_GROUP_NAME }, |
372 #endif | 373 #endif |
373 { "themesReset", IDS_THEMES_RESET_BUTTON }, | 374 { "themesReset", IDS_THEMES_RESET_BUTTON }, |
| 375 #if defined(OS_CHROMEOS) |
| 376 { "wakeOnWifiLabel", IDS_OPTIONS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION }, |
| 377 #endif |
374 { "accessibilityTitle", | 378 { "accessibilityTitle", |
375 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY }, | 379 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY }, |
376 { "accessibilityFeaturesLink", | 380 { "accessibilityFeaturesLink", |
377 IDS_OPTIONS_ACCESSIBILITY_FEATURES_LINK }, | 381 IDS_OPTIONS_ACCESSIBILITY_FEATURES_LINK }, |
378 #if defined(OS_CHROMEOS) | 382 #if defined(OS_CHROMEOS) |
379 { "accessibilityExplanation", | 383 { "accessibilityExplanation", |
380 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_EXPLANATION }, | 384 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_EXPLANATION }, |
381 { "accessibilitySettings", | 385 { "accessibilitySettings", |
382 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SETTINGS }, | 386 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SETTINGS }, |
383 { "accessibilityHighContrast", | 387 { "accessibilityHighContrast", |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 659 |
656 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); | 660 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); |
657 | 661 |
658 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); | 662 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); |
659 | 663 |
660 values->SetBoolean("websiteSettingsManagerEnabled", | 664 values->SetBoolean("websiteSettingsManagerEnabled", |
661 base::CommandLine::ForCurrentProcess()->HasSwitch( | 665 base::CommandLine::ForCurrentProcess()->HasSwitch( |
662 switches::kEnableWebsiteSettingsManager)); | 666 switches::kEnableWebsiteSettingsManager)); |
663 | 667 |
664 values->SetBoolean("usingNewProfilesUI", switches::IsNewAvatarMenu()); | 668 values->SetBoolean("usingNewProfilesUI", switches::IsNewAvatarMenu()); |
| 669 |
| 670 #if defined(OS_CHROMEOS) |
| 671 values->SetBoolean( |
| 672 "showWakeOnWifi", |
| 673 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && |
| 674 chromeos::switches::WakeOnWifiEnabled()); |
| 675 #endif |
665 } | 676 } |
666 | 677 |
667 #if defined(ENABLE_PRINT_PREVIEW) | 678 #if defined(ENABLE_PRINT_PREVIEW) |
668 void BrowserOptionsHandler::RegisterCloudPrintValues( | 679 void BrowserOptionsHandler::RegisterCloudPrintValues( |
669 base::DictionaryValue* values) { | 680 base::DictionaryValue* values) { |
670 values->SetString("cloudPrintOptionLabel", | 681 values->SetString("cloudPrintOptionLabel", |
671 l10n_util::GetStringFUTF16( | 682 l10n_util::GetStringFUTF16( |
672 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, | 683 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, |
673 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); | 684 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); |
674 } | 685 } |
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2098 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2109 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
2099 const policy::PolicyMap& previous, | 2110 const policy::PolicyMap& previous, |
2100 const policy::PolicyMap& current) { | 2111 const policy::PolicyMap& current) { |
2101 std::set<std::string> different_keys; | 2112 std::set<std::string> different_keys; |
2102 current.GetDifferingKeys(previous, &different_keys); | 2113 current.GetDifferingKeys(previous, &different_keys); |
2103 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2114 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
2104 SetupMetricsReportingCheckbox(); | 2115 SetupMetricsReportingCheckbox(); |
2105 } | 2116 } |
2106 | 2117 |
2107 } // namespace options | 2118 } // namespace options |
OLD | NEW |