Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_ui.cc

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Fix test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 #if defined(OS_CHROMEOS) 152 #if defined(OS_CHROMEOS)
153 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = 153 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler =
154 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, 154 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source,
155 profile); 155 profile);
156 if (easy_unlock_handler) 156 if (easy_unlock_handler)
157 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler)); 157 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler));
158 158
159 AddSettingsPageUIHandler(base::WrapUnique( 159 AddSettingsPageUIHandler(base::WrapUnique(
160 chromeos::settings::DateTimeHandler::Create(html_source))); 160 chromeos::settings::DateTimeHandler::Create(html_source)));
161 161
162 html_source->AddBoolean("stylusAllowed", ash::IsPaletteFeatureEnabled()); 162 AddSettingsPageUIHandler(
163 base::MakeUnique<chromeos::settings::StylusHandler>());
163 html_source->AddBoolean("pinUnlockEnabled", 164 html_source->AddBoolean("pinUnlockEnabled",
164 chromeos::IsPinUnlockEnabled(profile->GetPrefs())); 165 chromeos::IsPinUnlockEnabled(profile->GetPrefs()));
165 html_source->AddBoolean("fingerprintUnlockEnabled", 166 html_source->AddBoolean("fingerprintUnlockEnabled",
166 chromeos::IsFingerprintUnlockEnabled()); 167 chromeos::IsFingerprintUnlockEnabled());
167 html_source->AddBoolean("androidAppsAllowed", 168 html_source->AddBoolean("androidAppsAllowed",
168 arc::IsArcAllowedForProfile(profile) && 169 arc::IsArcAllowedForProfile(profile) &&
169 !arc::IsArcOptInVerificationDisabled()); 170 !arc::IsArcOptInVerificationDisabled());
170 171
171 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348 172 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348
172 bool enable_power_settings = 173 bool enable_power_settings =
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", 226 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD",
226 base::Time::Now() - load_start_time_); 227 base::Time::Now() - load_start_time_);
227 } 228 }
228 229
229 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { 230 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() {
230 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", 231 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD",
231 base::Time::Now() - load_start_time_); 232 base::Time::Now() - load_start_time_);
232 } 233 }
233 234
234 } // namespace settings 235 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698