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