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/options_ui.h" | 5 #include "chrome/browser/ui/webui/options/options_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 constexpr char kLockScreenConstantsJSPath[] = | 131 constexpr char kLockScreenConstantsJSPath[] = |
132 "people_page/lock_screen_constants.js"; | 132 "people_page/lock_screen_constants.js"; |
133 constexpr char kLockStateBehaviorHTMLPath[] = | 133 constexpr char kLockStateBehaviorHTMLPath[] = |
134 "people_page/lock_state_behavior.html"; | 134 "people_page/lock_state_behavior.html"; |
135 constexpr char kLockStateBehaviorJSPath[] = | 135 constexpr char kLockStateBehaviorJSPath[] = |
136 "people_page/lock_state_behavior.js"; | 136 "people_page/lock_state_behavior.js"; |
137 constexpr char kLockScreenHTMLPath[] = "people_page/lock_screen.html"; | 137 constexpr char kLockScreenHTMLPath[] = "people_page/lock_screen.html"; |
138 constexpr char kLockScreenJSPath[] = "people_page/lock_screen.js"; | 138 constexpr char kLockScreenJSPath[] = "people_page/lock_screen.js"; |
139 constexpr char kSetupPinHTMLPath[] = "people_page/setup_pin_dialog.html"; | 139 constexpr char kSetupPinHTMLPath[] = "people_page/setup_pin_dialog.html"; |
140 constexpr char kSetupPinJSPath[] = "people_page/setup_pin_dialog.js"; | 140 constexpr char kSetupPinJSPath[] = "people_page/setup_pin_dialog.js"; |
| 141 constexpr char kFingerprintListHTMLPath[] = "people_page/fingerprint_list.html"; |
| 142 constexpr char kFingerprintListJSPath[] = "people_page/fingerprint_list.js"; |
141 constexpr char kSettingsRouteHTMLPath[] = "route.html"; | 143 constexpr char kSettingsRouteHTMLPath[] = "route.html"; |
142 constexpr char kSettingsRouteJSPath[] = "route.js"; | 144 constexpr char kSettingsRouteJSPath[] = "route.js"; |
143 constexpr char kSettingsSharedCSSHTMLPath[] = "settings_shared_css.html"; | 145 constexpr char kSettingsSharedCSSHTMLPath[] = "settings_shared_css.html"; |
144 constexpr char kSettingsVarsCSSHTMLPath[] = "settings_vars_css.html"; | 146 constexpr char kSettingsVarsCSSHTMLPath[] = "settings_vars_css.html"; |
145 constexpr char kSettingsPrefsBehaviorHTMLPath[] = "prefs/prefs_behavior.html"; | 147 constexpr char kSettingsPrefsBehaviorHTMLPath[] = "prefs/prefs_behavior.html"; |
146 constexpr char kSettingsPrefsBehaviorJSPath[] = "prefs/prefs_behavior.js"; | 148 constexpr char kSettingsPrefsBehaviorJSPath[] = "prefs/prefs_behavior.js"; |
147 constexpr char kSettingsPrefsTypesHTMLPath[] = "prefs/prefs_types.html"; | 149 constexpr char kSettingsPrefsTypesHTMLPath[] = "prefs/prefs_types.html"; |
148 constexpr char kSettingsPrefsTypesJSPath[] = "prefs/prefs_types.js"; | 150 constexpr char kSettingsPrefsTypesJSPath[] = "prefs/prefs_types.js"; |
149 constexpr char kOptionsPolymerHTMLPath[] = "options_polymer.html"; | 151 constexpr char kOptionsPolymerHTMLPath[] = "options_polymer.html"; |
150 #endif | 152 #endif |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 251 |
250 bool OptionsUIHTMLSource::ShouldDenyXFrameOptions() const { | 252 bool OptionsUIHTMLSource::ShouldDenyXFrameOptions() const { |
251 return false; | 253 return false; |
252 } | 254 } |
253 | 255 |
254 OptionsUIHTMLSource::~OptionsUIHTMLSource() {} | 256 OptionsUIHTMLSource::~OptionsUIHTMLSource() {} |
255 | 257 |
256 void OptionsUIHTMLSource::CreateDataSourceMap() { | 258 void OptionsUIHTMLSource::CreateDataSourceMap() { |
257 #if defined(OS_CHROMEOS) | 259 #if defined(OS_CHROMEOS) |
258 path_to_idr_map_[kIconsHTMLPath] = IDR_OPTIONS_ICONS_HTML; | 260 path_to_idr_map_[kIconsHTMLPath] = IDR_OPTIONS_ICONS_HTML; |
| 261 |
| 262 // These are part of the LockScreen UI. |
259 path_to_idr_map_[kPinKeyboardHTMLPath] = IDR_OPTIONS_PIN_KEYBOARD_HTML; | 263 path_to_idr_map_[kPinKeyboardHTMLPath] = IDR_OPTIONS_PIN_KEYBOARD_HTML; |
260 path_to_idr_map_[kPinKeyboardJSPath] = IDR_OPTIONS_PIN_KEYBOARD_JS; | 264 path_to_idr_map_[kPinKeyboardJSPath] = IDR_OPTIONS_PIN_KEYBOARD_JS; |
261 path_to_idr_map_[kPasswordPromptDialogHTMLPath] = | 265 path_to_idr_map_[kPasswordPromptDialogHTMLPath] = |
262 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_HTML; | 266 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_HTML; |
263 path_to_idr_map_[kPasswordPromptDialogJSPath] = | 267 path_to_idr_map_[kPasswordPromptDialogJSPath] = |
264 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_JS; | 268 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_JS; |
265 path_to_idr_map_[kLockScreenConstantsHTMLPath] = | 269 path_to_idr_map_[kLockScreenConstantsHTMLPath] = |
266 IDR_OPTIONS_LOCK_SCREEN_CONSTANTS_HTML; | 270 IDR_OPTIONS_LOCK_SCREEN_CONSTANTS_HTML; |
267 path_to_idr_map_[kLockScreenConstantsJSPath] = | 271 path_to_idr_map_[kLockScreenConstantsJSPath] = |
268 IDR_OPTIONS_LOCK_SCREEN_CONSTANTS_JS; | 272 IDR_OPTIONS_LOCK_SCREEN_CONSTANTS_JS; |
269 path_to_idr_map_[kLockStateBehaviorHTMLPath] = | 273 path_to_idr_map_[kLockStateBehaviorHTMLPath] = |
270 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_HTML; | 274 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_HTML; |
271 path_to_idr_map_[kLockStateBehaviorJSPath] = | 275 path_to_idr_map_[kLockStateBehaviorJSPath] = |
272 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_JS; | 276 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_JS; |
273 path_to_idr_map_[kLockScreenHTMLPath] = IDR_OPTIONS_LOCK_SCREEN_HTML; | 277 path_to_idr_map_[kLockScreenHTMLPath] = IDR_OPTIONS_LOCK_SCREEN_HTML; |
274 path_to_idr_map_[kLockScreenJSPath] = IDR_OPTIONS_LOCK_SCREEN_JS; | 278 path_to_idr_map_[kLockScreenJSPath] = IDR_OPTIONS_LOCK_SCREEN_JS; |
275 path_to_idr_map_[kSetupPinHTMLPath] = IDR_OPTIONS_SETUP_PIN_DIALOG_HTML; | 279 path_to_idr_map_[kSetupPinHTMLPath] = IDR_OPTIONS_SETUP_PIN_DIALOG_HTML; |
276 path_to_idr_map_[kSetupPinJSPath] = IDR_OPTIONS_SETUP_PIN_DIALOG_JS; | 280 path_to_idr_map_[kSetupPinJSPath] = IDR_OPTIONS_SETUP_PIN_DIALOG_JS; |
| 281 path_to_idr_map_[kFingerprintListHTMLPath] = |
| 282 IDR_OPTIONS_FINGERPRINT_LIST_HTML; |
| 283 path_to_idr_map_[kFingerprintListJSPath] = IDR_OPTIONS_FINGERPRINT_LIST_JS; |
| 284 |
277 path_to_idr_map_[kSettingsRouteHTMLPath] = IDR_OPTIONS_ROUTE_HTML; | 285 path_to_idr_map_[kSettingsRouteHTMLPath] = IDR_OPTIONS_ROUTE_HTML; |
278 path_to_idr_map_[kSettingsRouteJSPath] = IDR_OPTIONS_ROUTE_JS; | 286 path_to_idr_map_[kSettingsRouteJSPath] = IDR_OPTIONS_ROUTE_JS; |
279 path_to_idr_map_[kSettingsSharedCSSHTMLPath] = IDR_SETTINGS_SHARED_CSS_HTML; | 287 path_to_idr_map_[kSettingsSharedCSSHTMLPath] = IDR_SETTINGS_SHARED_CSS_HTML; |
280 path_to_idr_map_[kSettingsVarsCSSHTMLPath] = IDR_SETTINGS_VARS_CSS_HTML; | 288 path_to_idr_map_[kSettingsVarsCSSHTMLPath] = IDR_SETTINGS_VARS_CSS_HTML; |
281 path_to_idr_map_[kSettingsPrefsBehaviorHTMLPath] = | 289 path_to_idr_map_[kSettingsPrefsBehaviorHTMLPath] = |
282 IDR_SETTINGS_PREFS_BEHAVIOR_HTML; | 290 IDR_SETTINGS_PREFS_BEHAVIOR_HTML; |
283 path_to_idr_map_[kSettingsPrefsBehaviorJSPath] = | 291 path_to_idr_map_[kSettingsPrefsBehaviorJSPath] = |
284 IDR_SETTINGS_PREFS_BEHAVIOR_JS; | 292 IDR_SETTINGS_PREFS_BEHAVIOR_JS; |
285 path_to_idr_map_[kSettingsPrefsTypesHTMLPath] = IDR_SETTINGS_PREFS_TYPES_HTML; | 293 path_to_idr_map_[kSettingsPrefsTypesHTMLPath] = IDR_SETTINGS_PREFS_TYPES_HTML; |
286 path_to_idr_map_[kSettingsPrefsTypesJSPath] = IDR_SETTINGS_PREFS_TYPES_JS; | 294 path_to_idr_map_[kSettingsPrefsTypesJSPath] = IDR_SETTINGS_PREFS_TYPES_JS; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 // Add only if handler's service is enabled. | 573 // Add only if handler's service is enabled. |
566 if (handler->IsEnabled()) { | 574 if (handler->IsEnabled()) { |
567 // Add handler to the list and also pass the ownership. | 575 // Add handler to the list and also pass the ownership. |
568 web_ui()->AddMessageHandler(std::move(handler)); | 576 web_ui()->AddMessageHandler(std::move(handler)); |
569 handler_raw->GetLocalizedValues(localized_strings); | 577 handler_raw->GetLocalizedValues(localized_strings); |
570 handlers_.push_back(handler_raw); | 578 handlers_.push_back(handler_raw); |
571 } | 579 } |
572 } | 580 } |
573 | 581 |
574 } // namespace options | 582 } // namespace options |
OLD | NEW |