| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #include "ui/webui/web_ui_util.h" | 82 #include "ui/webui/web_ui_util.h" |
| 83 | 83 |
| 84 #if defined(ENABLE_MANAGED_USERS) | 84 #if defined(ENABLE_MANAGED_USERS) |
| 85 #include "chrome/browser/managed_mode/managed_user_service.h" | 85 #include "chrome/browser/managed_mode/managed_user_service.h" |
| 86 #include "chrome/browser/managed_mode/managed_user_service_factory.h" | 86 #include "chrome/browser/managed_mode/managed_user_service_factory.h" |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 #if !defined(OS_CHROMEOS) | 89 #if !defined(OS_CHROMEOS) |
| 90 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 90 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
| 91 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" | 91 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" |
| 92 #include "chromeos/chromeos_switches.h" |
| 92 #endif | 93 #endif |
| 93 | 94 |
| 94 #if defined(OS_CHROMEOS) | 95 #if defined(OS_CHROMEOS) |
| 95 #include "ash/magnifier/magnifier_constants.h" | 96 #include "ash/magnifier/magnifier_constants.h" |
| 96 #include "base/chromeos/chromeos_version.h" | 97 #include "base/chromeos/chromeos_version.h" |
| 97 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 98 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 98 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" | 99 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" |
| 99 #include "chrome/browser/chromeos/login/user_manager.h" | 100 #include "chrome/browser/chromeos/login/user_manager.h" |
| 100 #include "chrome/browser/chromeos/settings/cros_settings.h" | 101 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 101 #include "chrome/browser/policy/browser_policy_connector.h" | 102 #include "chrome/browser/policy/browser_policy_connector.h" |
| 102 #include "chrome/browser/ui/browser_window.h" | 103 #include "chrome/browser/ui/browser_window.h" |
| 103 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" | 104 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" |
| 105 #include "chromeos/chromeos_switches.h" |
| 104 #include "chromeos/dbus/dbus_thread_manager.h" | 106 #include "chromeos/dbus/dbus_thread_manager.h" |
| 105 #include "chromeos/dbus/power_manager_client.h" | 107 #include "chromeos/dbus/power_manager_client.h" |
| 106 #include "ui/gfx/image/image_skia.h" | 108 #include "ui/gfx/image/image_skia.h" |
| 107 #endif // defined(OS_CHROMEOS) | 109 #endif // defined(OS_CHROMEOS) |
| 108 | 110 |
| 109 #if defined(OS_WIN) | 111 #if defined(OS_WIN) |
| 110 #include "chrome/installer/util/auto_launch_util.h" | 112 #include "chrome/installer/util/auto_launch_util.h" |
| 111 #endif // defined(OS_WIN) | 113 #endif // defined(OS_WIN) |
| 112 | 114 |
| 113 #if defined(TOOLKIT_GTK) | 115 #if defined(TOOLKIT_GTK) |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); | 1413 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); |
| 1412 web_ui()->CallJavascriptFunction( | 1414 web_ui()->CallJavascriptFunction( |
| 1413 "BrowserOptions.setVirtualKeyboardCheckboxState", | 1415 "BrowserOptions.setVirtualKeyboardCheckboxState", |
| 1414 virtual_keyboard_enabled); | 1416 virtual_keyboard_enabled); |
| 1415 } | 1417 } |
| 1416 #endif | 1418 #endif |
| 1417 | 1419 |
| 1418 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { | 1420 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { |
| 1419 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) | 1421 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) |
| 1420 // Don't show the reporting setting if we are in the guest mode. | 1422 // Don't show the reporting setting if we are in the guest mode. |
| 1421 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { | 1423 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1424 chromeos::switches::kGuestSession)) { |
| 1422 base::FundamentalValue visible(false); | 1425 base::FundamentalValue visible(false); |
| 1423 web_ui()->CallJavascriptFunction( | 1426 web_ui()->CallJavascriptFunction( |
| 1424 "BrowserOptions.setMetricsReportingSettingVisibility", visible); | 1427 "BrowserOptions.setMetricsReportingSettingVisibility", visible); |
| 1425 } | 1428 } |
| 1426 #endif | 1429 #endif |
| 1427 } | 1430 } |
| 1428 | 1431 |
| 1429 void BrowserOptionsHandler::SetupPasswordGenerationSettingVisibility() { | 1432 void BrowserOptionsHandler::SetupPasswordGenerationSettingVisibility() { |
| 1430 base::FundamentalValue visible( | 1433 base::FundamentalValue visible( |
| 1431 CommandLine::ForCurrentProcess()->HasSwitch( | 1434 CommandLine::ForCurrentProcess()->HasSwitch( |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1500 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || | 1503 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || |
| 1501 is_extension_controlled); | 1504 is_extension_controlled); |
| 1502 base::FundamentalValue extension_controlled(is_extension_controlled); | 1505 base::FundamentalValue extension_controlled(is_extension_controlled); |
| 1503 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", | 1506 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", |
| 1504 disabled, extension_controlled); | 1507 disabled, extension_controlled); |
| 1505 | 1508 |
| 1506 #endif // !defined(OS_CHROMEOS) | 1509 #endif // !defined(OS_CHROMEOS) |
| 1507 } | 1510 } |
| 1508 | 1511 |
| 1509 } // namespace options | 1512 } // namespace options |
| OLD | NEW |