| 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" | |
| 93 #endif | 92 #endif |
| 94 | 93 |
| 95 #if defined(OS_CHROMEOS) | 94 #if defined(OS_CHROMEOS) |
| 96 #include "ash/magnifier/magnifier_constants.h" | 95 #include "ash/magnifier/magnifier_constants.h" |
| 97 #include "base/chromeos/chromeos_version.h" | 96 #include "base/chromeos/chromeos_version.h" |
| 98 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 97 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 99 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" | 98 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" |
| 100 #include "chrome/browser/chromeos/login/user_manager.h" | 99 #include "chrome/browser/chromeos/login/user_manager.h" |
| 101 #include "chrome/browser/chromeos/settings/cros_settings.h" | 100 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 102 #include "chrome/browser/policy/browser_policy_connector.h" | 101 #include "chrome/browser/policy/browser_policy_connector.h" |
| (...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); | 1411 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); |
| 1413 web_ui()->CallJavascriptFunction( | 1412 web_ui()->CallJavascriptFunction( |
| 1414 "BrowserOptions.setVirtualKeyboardCheckboxState", | 1413 "BrowserOptions.setVirtualKeyboardCheckboxState", |
| 1415 virtual_keyboard_enabled); | 1414 virtual_keyboard_enabled); |
| 1416 } | 1415 } |
| 1417 #endif | 1416 #endif |
| 1418 | 1417 |
| 1419 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { | 1418 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { |
| 1420 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) | 1419 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) |
| 1421 // Don't show the reporting setting if we are in the guest mode. | 1420 // Don't show the reporting setting if we are in the guest mode. |
| 1422 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1421 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { |
| 1423 chromeos::switches::kGuestSession)) { | |
| 1424 base::FundamentalValue visible(false); | 1422 base::FundamentalValue visible(false); |
| 1425 web_ui()->CallJavascriptFunction( | 1423 web_ui()->CallJavascriptFunction( |
| 1426 "BrowserOptions.setMetricsReportingSettingVisibility", visible); | 1424 "BrowserOptions.setMetricsReportingSettingVisibility", visible); |
| 1427 } | 1425 } |
| 1428 #endif | 1426 #endif |
| 1429 } | 1427 } |
| 1430 | 1428 |
| 1431 void BrowserOptionsHandler::SetupPasswordGenerationSettingVisibility() { | 1429 void BrowserOptionsHandler::SetupPasswordGenerationSettingVisibility() { |
| 1432 base::FundamentalValue visible( | 1430 base::FundamentalValue visible( |
| 1433 CommandLine::ForCurrentProcess()->HasSwitch( | 1431 CommandLine::ForCurrentProcess()->HasSwitch( |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || | 1500 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || |
| 1503 is_extension_controlled); | 1501 is_extension_controlled); |
| 1504 base::FundamentalValue extension_controlled(is_extension_controlled); | 1502 base::FundamentalValue extension_controlled(is_extension_controlled); |
| 1505 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", | 1503 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", |
| 1506 disabled, extension_controlled); | 1504 disabled, extension_controlled); |
| 1507 | 1505 |
| 1508 #endif // !defined(OS_CHROMEOS) | 1506 #endif // !defined(OS_CHROMEOS) |
| 1509 } | 1507 } |
| 1510 | 1508 |
| 1511 } // namespace options | 1509 } // namespace options |
| OLD | NEW |