| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 136 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
| 137 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 137 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 138 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" | 138 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
| 139 #include "chrome/browser/ui/browser_window.h" | 139 #include "chrome/browser/ui/browser_window.h" |
| 140 #include "chromeos/chromeos_switches.h" | 140 #include "chromeos/chromeos_switches.h" |
| 141 #include "chromeos/dbus/dbus_thread_manager.h" | 141 #include "chromeos/dbus/dbus_thread_manager.h" |
| 142 #include "chromeos/dbus/power_manager_client.h" | 142 #include "chromeos/dbus/power_manager_client.h" |
| 143 #include "components/arc/arc_bridge_service.h" | 143 #include "components/arc/arc_bridge_service.h" |
| 144 #include "components/user_manager/user.h" | 144 #include "components/user_manager/user.h" |
| 145 #include "components/user_manager/user_manager.h" | 145 #include "components/user_manager/user_manager.h" |
| 146 #include "ui/events/event_constants.h" |
| 146 #include "ui/gfx/image/image_skia.h" | 147 #include "ui/gfx/image/image_skia.h" |
| 147 #endif // defined(OS_CHROMEOS) | 148 #endif // defined(OS_CHROMEOS) |
| 148 | 149 |
| 149 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) | 150 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) |
| 150 #include "chrome/browser/printing/cloud_print/privet_notifications.h" | 151 #include "chrome/browser/printing/cloud_print/privet_notifications.h" |
| 151 #endif | 152 #endif |
| 152 | 153 |
| 153 #if defined(USE_ASH) | 154 #if defined(USE_ASH) |
| 154 #include "ash/common/wm_shell.h" // nogncheck | 155 #include "ash/common/wm_shell.h" // nogncheck |
| 155 #endif | 156 #endif |
| (...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 | 2002 |
| 2002 void BrowserOptionsHandler::ShowAndroidAppsSettings( | 2003 void BrowserOptionsHandler::ShowAndroidAppsSettings( |
| 2003 const base::ListValue* args) { | 2004 const base::ListValue* args) { |
| 2004 Profile* profile = Profile::FromWebUI(web_ui()); | 2005 Profile* profile = Profile::FromWebUI(web_ui()); |
| 2005 // Settings in secondary profile cannot access ARC. | 2006 // Settings in secondary profile cannot access ARC. |
| 2006 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) { | 2007 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) { |
| 2007 LOG(ERROR) << "Settings can't be invoked for non-primary profile"; | 2008 LOG(ERROR) << "Settings can't be invoked for non-primary profile"; |
| 2008 return; | 2009 return; |
| 2009 } | 2010 } |
| 2010 | 2011 |
| 2011 arc::LaunchAndroidSettingsApp(profile); | 2012 arc::LaunchAndroidSettingsApp(profile, ui::EF_NONE); |
| 2012 } | 2013 } |
| 2013 | 2014 |
| 2014 void BrowserOptionsHandler::ShowAccessibilityTalkBackSettings( | 2015 void BrowserOptionsHandler::ShowAccessibilityTalkBackSettings( |
| 2015 const base::ListValue *args) { | 2016 const base::ListValue *args) { |
| 2016 Profile* profile = Profile::FromWebUI(web_ui()); | 2017 Profile* profile = Profile::FromWebUI(web_ui()); |
| 2017 // Settings in secondary profile cannot access ARC. | 2018 // Settings in secondary profile cannot access ARC. |
| 2018 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) { | 2019 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) { |
| 2019 LOG(WARNING) << "Settings can't be invoked for non-primary profile"; | 2020 LOG(WARNING) << "Settings can't be invoked for non-primary profile"; |
| 2020 return; | 2021 return; |
| 2021 } | 2022 } |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2290 | 2291 |
| 2291 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2292 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2292 #if defined(OS_CHROMEOS) | 2293 #if defined(OS_CHROMEOS) |
| 2293 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2294 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2294 #else | 2295 #else |
| 2295 return true; | 2296 return true; |
| 2296 #endif | 2297 #endif |
| 2297 } | 2298 } |
| 2298 | 2299 |
| 2299 } // namespace options | 2300 } // namespace options |
| OLD | NEW |