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 24 matching lines...) Expand all Loading... |
35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
36 #include "content/public/browser/web_ui.h" | 36 #include "content/public/browser/web_ui.h" |
37 #include "content/public/browser/web_ui_data_source.h" | 37 #include "content/public/browser/web_ui_data_source.h" |
38 | 38 |
39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
40 #include "ash/common/system/chromeos/palette/palette_utils.h" | 40 #include "ash/common/system/chromeos/palette/palette_utils.h" |
41 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" | 41 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" |
42 #include "chrome/browser/ui/webui/settings/chromeos/accessibility_handler.h" | 42 #include "chrome/browser/ui/webui/settings/chromeos/accessibility_handler.h" |
43 #include "chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h" | 43 #include "chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h" |
44 #include "chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h" | 44 #include "chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h" |
| 45 #include "chrome/browser/ui/webui/settings/chromeos/date_time_handler.h" |
45 #include "chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h" | 46 #include "chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h" |
46 #include "chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h" | 47 #include "chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h" |
47 #include "chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler
.h" | 48 #include "chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler
.h" |
48 #include "chrome/browser/ui/webui/settings/chromeos/internet_handler.h" | 49 #include "chrome/browser/ui/webui/settings/chromeos/internet_handler.h" |
49 #else // !defined(OS_CHROMEOS) | 50 #else // !defined(OS_CHROMEOS) |
50 #include "chrome/browser/ui/webui/settings/settings_default_browser_handler.h" | 51 #include "chrome/browser/ui/webui/settings/settings_default_browser_handler.h" |
51 #include "chrome/browser/ui/webui/settings/settings_manage_profile_handler.h" | 52 #include "chrome/browser/ui/webui/settings/settings_manage_profile_handler.h" |
52 #include "chrome/browser/ui/webui/settings/system_handler.h" | 53 #include "chrome/browser/ui/webui/settings/system_handler.h" |
53 #endif // defined(OS_CHROMEOS) | 54 #endif // defined(OS_CHROMEOS) |
54 | 55 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 content::WebUIDataSource* html_source = | 112 content::WebUIDataSource* html_source = |
112 content::WebUIDataSource::Create(url.host()); | 113 content::WebUIDataSource::Create(url.host()); |
113 | 114 |
114 #if defined(OS_CHROMEOS) | 115 #if defined(OS_CHROMEOS) |
115 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = | 116 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = |
116 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, | 117 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, |
117 profile); | 118 profile); |
118 if (easy_unlock_handler) | 119 if (easy_unlock_handler) |
119 AddSettingsPageUIHandler(easy_unlock_handler); | 120 AddSettingsPageUIHandler(easy_unlock_handler); |
120 | 121 |
| 122 AddSettingsPageUIHandler( |
| 123 chromeos::settings::DateTimeHandler::Create(html_source)); |
| 124 |
121 html_source->AddBoolean("stylusAllowed", ash::IsPaletteFeatureEnabled()); | 125 html_source->AddBoolean("stylusAllowed", ash::IsPaletteFeatureEnabled()); |
122 html_source->AddBoolean("quickUnlockEnabled", | 126 html_source->AddBoolean("quickUnlockEnabled", |
123 chromeos::IsQuickUnlockEnabled()); | 127 chromeos::IsQuickUnlockEnabled()); |
124 #endif | 128 #endif |
125 | 129 |
126 AddSettingsPageUIHandler(AboutHandler::Create(html_source, profile)); | 130 AddSettingsPageUIHandler(AboutHandler::Create(html_source, profile)); |
127 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile)); | 131 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile)); |
128 | 132 |
129 // Add all settings resources. | 133 // Add all settings resources. |
130 for (size_t i = 0; i < kSettingsResourcesSize; ++i) { | 134 for (size_t i = 0; i < kSettingsResourcesSize; ++i) { |
(...skipping 30 matching lines...) Expand all Loading... |
161 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", | 165 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", |
162 base::Time::Now() - load_start_time_); | 166 base::Time::Now() - load_start_time_); |
163 } | 167 } |
164 | 168 |
165 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { | 169 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { |
166 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", | 170 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", |
167 base::Time::Now() - load_start_time_); | 171 base::Time::Now() - load_start_time_); |
168 } | 172 } |
169 | 173 |
170 } // namespace settings | 174 } // namespace settings |
OLD | NEW |