OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings/md_settings_ui.h" | 5 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "chrome/browser/ui/ash/ash_util.h" | 50 #include "chrome/browser/ui/ash/ash_util.h" |
51 #include "chrome/browser/ui/webui/settings/chromeos/accessibility_handler.h" | 51 #include "chrome/browser/ui/webui/settings/chromeos/accessibility_handler.h" |
52 #include "chrome/browser/ui/webui/settings/chromeos/android_apps_handler.h" | 52 #include "chrome/browser/ui/webui/settings/chromeos/android_apps_handler.h" |
53 #include "chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h" | 53 #include "chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h" |
54 #include "chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h" | 54 #include "chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h" |
55 #include "chrome/browser/ui/webui/settings/chromeos/date_time_handler.h" | 55 #include "chrome/browser/ui/webui/settings/chromeos/date_time_handler.h" |
56 #include "chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h" | 56 #include "chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h" |
57 #include "chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h" | 57 #include "chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h" |
58 #include "chrome/browser/ui/webui/settings/chromeos/device_power_handler.h" | 58 #include "chrome/browser/ui/webui/settings/chromeos/device_power_handler.h" |
59 #include "chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h" | 59 #include "chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h" |
| 60 #include "chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h" |
60 #include "chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler
.h" | 61 #include "chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler
.h" |
61 #include "chrome/browser/ui/webui/settings/chromeos/internet_handler.h" | 62 #include "chrome/browser/ui/webui/settings/chromeos/internet_handler.h" |
62 #include "chrome/common/chrome_switches.h" | 63 #include "chrome/common/chrome_switches.h" |
63 #else // !defined(OS_CHROMEOS) | 64 #else // !defined(OS_CHROMEOS) |
64 #include "chrome/browser/ui/webui/settings/settings_default_browser_handler.h" | 65 #include "chrome/browser/ui/webui/settings/settings_default_browser_handler.h" |
65 #include "chrome/browser/ui/webui/settings/settings_manage_profile_handler.h" | 66 #include "chrome/browser/ui/webui/settings/settings_manage_profile_handler.h" |
66 #include "chrome/browser/ui/webui/settings/system_handler.h" | 67 #include "chrome/browser/ui/webui/settings/system_handler.h" |
67 #endif // defined(OS_CHROMEOS) | 68 #endif // defined(OS_CHROMEOS) |
68 | 69 |
69 #if defined(USE_NSS_CERTS) | 70 #if defined(USE_NSS_CERTS) |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 #if defined(OS_CHROMEOS) | 144 #if defined(OS_CHROMEOS) |
144 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = | 145 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = |
145 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, | 146 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, |
146 profile); | 147 profile); |
147 if (easy_unlock_handler) | 148 if (easy_unlock_handler) |
148 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler)); | 149 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler)); |
149 | 150 |
150 AddSettingsPageUIHandler(base::WrapUnique( | 151 AddSettingsPageUIHandler(base::WrapUnique( |
151 chromeos::settings::DateTimeHandler::Create(html_source))); | 152 chromeos::settings::DateTimeHandler::Create(html_source))); |
152 | 153 |
153 html_source->AddBoolean("stylusAllowed", ash::IsPaletteFeatureEnabled()); | 154 AddSettingsPageUIHandler( |
| 155 base::MakeUnique<chromeos::settings::StylusHandler>()); |
154 html_source->AddBoolean("pinUnlockEnabled", | 156 html_source->AddBoolean("pinUnlockEnabled", |
155 chromeos::IsPinUnlockEnabled(profile->GetPrefs())); | 157 chromeos::IsPinUnlockEnabled(profile->GetPrefs())); |
156 html_source->AddBoolean( | 158 html_source->AddBoolean( |
157 "androidAppsAllowed", | 159 "androidAppsAllowed", |
158 arc::ArcSessionManager::IsAllowedForProfile(profile) && | 160 arc::ArcSessionManager::IsAllowedForProfile(profile) && |
159 !arc::ArcSessionManager::IsOptInVerificationDisabled()); | 161 !arc::ArcSessionManager::IsOptInVerificationDisabled()); |
160 | 162 |
161 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348 | 163 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348 |
162 bool enable_power_settings = | 164 bool enable_power_settings = |
163 !chrome::IsRunningInMash() && | 165 !chrome::IsRunningInMash() && |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", | 216 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", |
215 base::Time::Now() - load_start_time_); | 217 base::Time::Now() - load_start_time_); |
216 } | 218 } |
217 | 219 |
218 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { | 220 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { |
219 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", | 221 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", |
220 base::Time::Now() - load_start_time_); | 222 base::Time::Now() - load_start_time_); |
221 } | 223 } |
222 | 224 |
223 } // namespace settings | 225 } // namespace settings |
OLD | NEW |