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

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: Initial upload Created 3 years, 11 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 #if defined(OS_CHROMEOS) 143 #if defined(OS_CHROMEOS)
144 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = 144 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler =
145 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, 145 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source,
146 profile); 146 profile);
147 if (easy_unlock_handler) 147 if (easy_unlock_handler)
148 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler)); 148 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler));
149 149
150 AddSettingsPageUIHandler(base::WrapUnique( 150 AddSettingsPageUIHandler(base::WrapUnique(
151 chromeos::settings::DateTimeHandler::Create(html_source))); 151 chromeos::settings::DateTimeHandler::Create(html_source)));
152 152
153 html_source->AddBoolean("stylusAllowed", ash::IsPaletteFeatureEnabled()); 153 html_source->AddBoolean("stylusAllowed", ash::HasStylusInput());
stevenjb 2017/01/21 00:23:50 Observer in case it changes?
jdufault 2017/01/25 00:53:15 See above comment
154 html_source->AddBoolean("pinUnlockEnabled", 154 html_source->AddBoolean("pinUnlockEnabled",
155 chromeos::IsPinUnlockEnabled(profile->GetPrefs())); 155 chromeos::IsPinUnlockEnabled(profile->GetPrefs()));
156 html_source->AddBoolean( 156 html_source->AddBoolean(
157 "androidAppsAllowed", 157 "androidAppsAllowed",
158 arc::ArcSessionManager::IsAllowedForProfile(profile) && 158 arc::ArcSessionManager::IsAllowedForProfile(profile) &&
159 !arc::ArcSessionManager::IsOptInVerificationDisabled()); 159 !arc::ArcSessionManager::IsOptInVerificationDisabled());
160 160
161 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348 161 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348
162 bool enable_power_settings = 162 bool enable_power_settings =
163 !chrome::IsRunningInMash() && 163 !chrome::IsRunningInMash() &&
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", 214 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD",
215 base::Time::Now() - load_start_time_); 215 base::Time::Now() - load_start_time_);
216 } 216 }
217 217
218 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { 218 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() {
219 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", 219 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD",
220 base::Time::Now() - load_start_time_); 220 base::Time::Now() - load_start_time_);
221 } 221 }
222 222
223 } // namespace settings 223 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698