| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 #if !defined(OS_CHROMEOS) | 111 #if !defined(OS_CHROMEOS) |
| 112 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 112 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 113 #include "chrome/browser/ui/webui/settings_utils.h" | 113 #include "chrome/browser/ui/webui/settings_utils.h" |
| 114 #endif | 114 #endif |
| 115 | 115 |
| 116 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
| 117 #include "ash/common/accessibility_types.h" | 117 #include "ash/common/accessibility_types.h" |
| 118 #include "ash/common/ash_switches.h" | 118 #include "ash/common/ash_switches.h" |
| 119 #include "ash/common/system/chromeos/devicetype_utils.h" | 119 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 120 #include "ash/desktop_background/user_wallpaper_delegate.h" | 120 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 121 #include "ash/shell.h" | 121 #include "ash/shell.h" |
| 122 #include "chrome/browser/browser_process_platform_part.h" | 122 #include "chrome/browser/browser_process_platform_part.h" |
| 123 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 123 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 124 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 124 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
| 125 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" | 125 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" |
| 126 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 126 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 127 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" | 127 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
| 128 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 128 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 129 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 129 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 130 #include "chrome/browser/chromeos/reset/metrics.h" | 130 #include "chrome/browser/chromeos/reset/metrics.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 142 #include "components/user_manager/user.h" | 142 #include "components/user_manager/user.h" |
| 143 #include "components/user_manager/user_manager.h" | 143 #include "components/user_manager/user_manager.h" |
| 144 #include "ui/gfx/image/image_skia.h" | 144 #include "ui/gfx/image/image_skia.h" |
| 145 #endif // defined(OS_CHROMEOS) | 145 #endif // defined(OS_CHROMEOS) |
| 146 | 146 |
| 147 #if defined(ENABLE_SERVICE_DISCOVERY) | 147 #if defined(ENABLE_SERVICE_DISCOVERY) |
| 148 #include "chrome/browser/printing/cloud_print/privet_notifications.h" | 148 #include "chrome/browser/printing/cloud_print/privet_notifications.h" |
| 149 #endif | 149 #endif |
| 150 | 150 |
| 151 #if defined(USE_ASH) | 151 #if defined(USE_ASH) |
| 152 #include "ash/shell.h" | 152 #include "ash/common/wm_shell.h" |
| 153 #endif | 153 #endif |
| 154 | 154 |
| 155 using base::UserMetricsAction; | 155 using base::UserMetricsAction; |
| 156 using content::BrowserContext; | 156 using content::BrowserContext; |
| 157 using content::BrowserThread; | 157 using content::BrowserThread; |
| 158 using content::DownloadManager; | 158 using content::DownloadManager; |
| 159 using content::OpenURLParams; | 159 using content::OpenURLParams; |
| 160 using content::Referrer; | 160 using content::Referrer; |
| 161 using extensions::Extension; | 161 using extensions::Extension; |
| 162 using extensions::ExtensionRegistry; | 162 using extensions::ExtensionRegistry; |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 values->SetBoolean("multiple_profiles", | 655 values->SetBoolean("multiple_profiles", |
| 656 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); | 656 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); |
| 657 #endif | 657 #endif |
| 658 | 658 |
| 659 if (ShouldShowMultiProfilesUserList()) | 659 if (ShouldShowMultiProfilesUserList()) |
| 660 values->Set("profilesInfo", GetProfilesInfoList().release()); | 660 values->Set("profilesInfo", GetProfilesInfoList().release()); |
| 661 | 661 |
| 662 // Profile deletion is not allowed for any users using Metro mode. | 662 // Profile deletion is not allowed for any users using Metro mode. |
| 663 bool allow_deletion = true; | 663 bool allow_deletion = true; |
| 664 #if defined(USE_ASH) | 664 #if defined(USE_ASH) |
| 665 allow_deletion = allow_deletion && !ash::Shell::HasInstance(); | 665 allow_deletion = allow_deletion && !ash::WmShell::HasInstance(); |
| 666 #endif | 666 #endif |
| 667 values->SetBoolean("allowProfileDeletion", allow_deletion); | 667 values->SetBoolean("allowProfileDeletion", allow_deletion); |
| 668 | 668 |
| 669 values->SetBoolean("profileIsGuest", | 669 values->SetBoolean("profileIsGuest", |
| 670 Profile::FromWebUI(web_ui())->IsOffTheRecord()); | 670 Profile::FromWebUI(web_ui())->IsOffTheRecord()); |
| 671 | 671 |
| 672 values->SetBoolean("profileIsSupervised", | 672 values->SetBoolean("profileIsSupervised", |
| 673 Profile::FromWebUI(web_ui())->IsSupervised()); | 673 Profile::FromWebUI(web_ui())->IsSupervised()); |
| 674 | 674 |
| 675 #if !defined(OS_CHROMEOS) | 675 #if !defined(OS_CHROMEOS) |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1886 } | 1886 } |
| 1887 | 1887 |
| 1888 void BrowserOptionsHandler::HandleRefreshExtensionControlIndicators( | 1888 void BrowserOptionsHandler::HandleRefreshExtensionControlIndicators( |
| 1889 const base::ListValue* args) { | 1889 const base::ListValue* args) { |
| 1890 SetupExtensionControlledIndicators(); | 1890 SetupExtensionControlledIndicators(); |
| 1891 } | 1891 } |
| 1892 | 1892 |
| 1893 #if defined(OS_CHROMEOS) | 1893 #if defined(OS_CHROMEOS) |
| 1894 void BrowserOptionsHandler::HandleOpenWallpaperManager( | 1894 void BrowserOptionsHandler::HandleOpenWallpaperManager( |
| 1895 const base::ListValue* args) { | 1895 const base::ListValue* args) { |
| 1896 ash::Shell::GetInstance()->user_wallpaper_delegate()->OpenSetWallpaperPage(); | 1896 ash::WmShell::Get()->wallpaper_delegate()->OpenSetWallpaperPage(); |
| 1897 } | 1897 } |
| 1898 | 1898 |
| 1899 void BrowserOptionsHandler::VirtualKeyboardChangeCallback( | 1899 void BrowserOptionsHandler::VirtualKeyboardChangeCallback( |
| 1900 const base::ListValue* args) { | 1900 const base::ListValue* args) { |
| 1901 bool enabled = false; | 1901 bool enabled = false; |
| 1902 args->GetBoolean(0, &enabled); | 1902 args->GetBoolean(0, &enabled); |
| 1903 | 1903 |
| 1904 chromeos::accessibility::EnableVirtualKeyboard(enabled); | 1904 chromeos::accessibility::EnableVirtualKeyboard(enabled); |
| 1905 } | 1905 } |
| 1906 | 1906 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 | 2232 |
| 2233 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2233 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2234 #if defined(OS_CHROMEOS) | 2234 #if defined(OS_CHROMEOS) |
| 2235 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2235 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2236 #else | 2236 #else |
| 2237 return true; | 2237 return true; |
| 2238 #endif | 2238 #endif |
| 2239 } | 2239 } |
| 2240 | 2240 |
| 2241 } // namespace options | 2241 } // namespace options |
| OLD | NEW |