| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 constexpr char kLockScreenHTMLPath[] = "people_page/lock_screen.html"; | 138 constexpr char kLockScreenHTMLPath[] = "people_page/lock_screen.html"; |
| 139 constexpr char kLockScreenJSPath[] = "people_page/lock_screen.js"; | 139 constexpr char kLockScreenJSPath[] = "people_page/lock_screen.js"; |
| 140 constexpr char kSetupPinHTMLPath[] = "people_page/setup_pin_dialog.html"; | 140 constexpr char kSetupPinHTMLPath[] = "people_page/setup_pin_dialog.html"; |
| 141 constexpr char kSetupPinJSPath[] = "people_page/setup_pin_dialog.js"; | 141 constexpr char kSetupPinJSPath[] = "people_page/setup_pin_dialog.js"; |
| 142 constexpr char kFingerprintListHTMLPath[] = "people_page/fingerprint_list.html"; | 142 constexpr char kFingerprintListHTMLPath[] = "people_page/fingerprint_list.html"; |
| 143 constexpr char kFingerprintListJSPath[] = "people_page/fingerprint_list.js"; | 143 constexpr char kFingerprintListJSPath[] = "people_page/fingerprint_list.js"; |
| 144 constexpr char kSetupFingerprintHTMLPath[] = | 144 constexpr char kSetupFingerprintHTMLPath[] = |
| 145 "people_page/setup_fingerprint_dialog.html"; | 145 "people_page/setup_fingerprint_dialog.html"; |
| 146 constexpr char kSetupFingerprintJSPath[] = | 146 constexpr char kSetupFingerprintJSPath[] = |
| 147 "people_page/setup_fingerprint_dialog.js"; | 147 "people_page/setup_fingerprint_dialog.js"; |
| 148 constexpr char kFingerprintBrowserProxyHTMLPath[] = |
| 149 "people_page/fingerprint_browser_proxy.html"; |
| 150 constexpr char kFingerprintBrowserProxyJSPath[] = |
| 151 "people_page/fingerprint_browser_proxy.js"; |
| 152 constexpr char kFingerprintProgressArcHTMLPath[] = |
| 153 "people_page/fingerprint_progress_arc.html"; |
| 154 constexpr char kFingerprintProgressArcJSPath[] = |
| 155 "people_page/fingerprint_progress_arc.js"; |
| 148 constexpr char kSettingsRouteHTMLPath[] = "route.html"; | 156 constexpr char kSettingsRouteHTMLPath[] = "route.html"; |
| 149 constexpr char kSettingsRouteJSPath[] = "route.js"; | 157 constexpr char kSettingsRouteJSPath[] = "route.js"; |
| 150 constexpr char kSettingsSharedCSSHTMLPath[] = "settings_shared_css.html"; | 158 constexpr char kSettingsSharedCSSHTMLPath[] = "settings_shared_css.html"; |
| 151 constexpr char kSettingsBooleanControlBehaviorHTMLPath[] = | 159 constexpr char kSettingsBooleanControlBehaviorHTMLPath[] = |
| 152 "controls/settings_boolean_control_behavior.html"; | 160 "controls/settings_boolean_control_behavior.html"; |
| 153 constexpr char kSettingsBooleanControlBehaviorJSPath[] = | 161 constexpr char kSettingsBooleanControlBehaviorJSPath[] = |
| 154 "controls/settings_boolean_control_behavior.js"; | 162 "controls/settings_boolean_control_behavior.js"; |
| 155 constexpr char kSettingsPrefControlBehaviorHTMLPath[] = | 163 constexpr char kSettingsPrefControlBehaviorHTMLPath[] = |
| 156 "controls/pref_control_behavior.html"; | 164 "controls/pref_control_behavior.html"; |
| 157 constexpr char kSettingsPrefControlBehaviorJSPath[] = | 165 constexpr char kSettingsPrefControlBehaviorJSPath[] = |
| 158 "controls/pref_control_behavior.js"; | 166 "controls/pref_control_behavior.js"; |
| 159 constexpr char kSettingsToggleButtonHTMLPath[] = | 167 constexpr char kSettingsToggleButtonHTMLPath[] = |
| 160 "controls/settings_toggle_button.html"; | 168 "controls/settings_toggle_button.html"; |
| 161 constexpr char kSettingsToggleButtonJSPath[] = | 169 constexpr char kSettingsToggleButtonJSPath[] = |
| 162 "controls/settings_toggle_button.js"; | 170 "controls/settings_toggle_button.js"; |
| 163 constexpr char kSettingsVarsCSSHTMLPath[] = "settings_vars_css.html"; | 171 constexpr char kSettingsVarsCSSHTMLPath[] = "settings_vars_css.html"; |
| 164 constexpr char kSettingsPrefsBehaviorHTMLPath[] = "prefs/prefs_behavior.html"; | 172 constexpr char kSettingsPrefsBehaviorHTMLPath[] = "prefs/prefs_behavior.html"; |
| 165 constexpr char kSettingsPrefsBehaviorJSPath[] = "prefs/prefs_behavior.js"; | 173 constexpr char kSettingsPrefsBehaviorJSPath[] = "prefs/prefs_behavior.js"; |
| 166 constexpr char kSettingsPrefsTypesHTMLPath[] = "prefs/prefs_types.html"; | 174 constexpr char kSettingsPrefsTypesHTMLPath[] = "prefs/prefs_types.html"; |
| 167 constexpr char kSettingsPrefsTypesJSPath[] = "prefs/prefs_types.js"; | 175 constexpr char kSettingsPrefsTypesJSPath[] = "prefs/prefs_types.js"; |
| 176 constexpr char kSettingsPrefsHTMLPath[] = "prefs/prefs.html"; |
| 177 constexpr char kSettingsPrefsJSPath[] = "prefs/prefs.js"; |
| 178 constexpr char kSettingsI18nHTMLPath[] = "i18n_setup.html"; |
| 168 constexpr char kOptionsPolymerHTMLPath[] = "options_polymer.html"; | 179 constexpr char kOptionsPolymerHTMLPath[] = "options_polymer.html"; |
| 169 #endif | 180 #endif |
| 170 | 181 |
| 171 } // namespace | 182 } // namespace |
| 172 | 183 |
| 173 namespace options { | 184 namespace options { |
| 174 | 185 |
| 175 //////////////////////////////////////////////////////////////////////////////// | 186 //////////////////////////////////////////////////////////////////////////////// |
| 176 // | 187 // |
| 177 // OptionsUIHTMLSource | 188 // OptionsUIHTMLSource |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 IDR_SETTINGS_TOGGLE_BUTTON_HTML; | 329 IDR_SETTINGS_TOGGLE_BUTTON_HTML; |
| 319 path_to_idr_map_[kSettingsToggleButtonJSPath] = IDR_SETTINGS_TOGGLE_BUTTON_JS; | 330 path_to_idr_map_[kSettingsToggleButtonJSPath] = IDR_SETTINGS_TOGGLE_BUTTON_JS; |
| 320 path_to_idr_map_[kSettingsVarsCSSHTMLPath] = IDR_SETTINGS_VARS_CSS_HTML; | 331 path_to_idr_map_[kSettingsVarsCSSHTMLPath] = IDR_SETTINGS_VARS_CSS_HTML; |
| 321 path_to_idr_map_[kSettingsPrefsBehaviorHTMLPath] = | 332 path_to_idr_map_[kSettingsPrefsBehaviorHTMLPath] = |
| 322 IDR_SETTINGS_PREFS_BEHAVIOR_HTML; | 333 IDR_SETTINGS_PREFS_BEHAVIOR_HTML; |
| 323 path_to_idr_map_[kSettingsPrefsBehaviorJSPath] = | 334 path_to_idr_map_[kSettingsPrefsBehaviorJSPath] = |
| 324 IDR_SETTINGS_PREFS_BEHAVIOR_JS; | 335 IDR_SETTINGS_PREFS_BEHAVIOR_JS; |
| 325 path_to_idr_map_[kSettingsPrefsTypesHTMLPath] = IDR_SETTINGS_PREFS_TYPES_HTML; | 336 path_to_idr_map_[kSettingsPrefsTypesHTMLPath] = IDR_SETTINGS_PREFS_TYPES_HTML; |
| 326 path_to_idr_map_[kSettingsPrefsTypesJSPath] = IDR_SETTINGS_PREFS_TYPES_JS; | 337 path_to_idr_map_[kSettingsPrefsTypesJSPath] = IDR_SETTINGS_PREFS_TYPES_JS; |
| 327 path_to_idr_map_[kOptionsPolymerHTMLPath] = IDR_OPTIONS_POLYMER_ELEMENTS_HTML; | 338 path_to_idr_map_[kOptionsPolymerHTMLPath] = IDR_OPTIONS_POLYMER_ELEMENTS_HTML; |
| 339 path_to_idr_map_[kSettingsPrefsHTMLPath] = IDR_SETTINGS_PREFS_HTML; |
| 340 path_to_idr_map_[kSettingsPrefsJSPath] = IDR_SETTINGS_PREFS_JS; |
| 341 path_to_idr_map_[kSettingsI18nHTMLPath] = IDR_OPTIONS_I18N_SETUP_HTML; |
| 342 path_to_idr_map_[kFingerprintBrowserProxyHTMLPath] = |
| 343 IDR_OPTIONS_FINGERPRINT_BROWSER_PROXY_HTML; |
| 344 path_to_idr_map_[kFingerprintBrowserProxyJSPath] = |
| 345 IDR_OPTIONS_FINGERPRINT_BROWSER_PROXY_JS; |
| 346 path_to_idr_map_[kFingerprintProgressArcHTMLPath] = |
| 347 IDR_OPTIONS_FINGERPRINT_PROGRESS_ARC_HTML; |
| 348 path_to_idr_map_[kFingerprintProgressArcJSPath] = |
| 349 IDR_OPTIONS_FINGERPRINT_PROGRESS_ARC_JS; |
| 328 #endif | 350 #endif |
| 329 } | 351 } |
| 330 | 352 |
| 331 //////////////////////////////////////////////////////////////////////////////// | 353 //////////////////////////////////////////////////////////////////////////////// |
| 332 // | 354 // |
| 333 // OptionsPageUIHandler | 355 // OptionsPageUIHandler |
| 334 // | 356 // |
| 335 //////////////////////////////////////////////////////////////////////////////// | 357 //////////////////////////////////////////////////////////////////////////////// |
| 336 | 358 |
| 337 OptionsPageUIHandler::OptionsPageUIHandler() { | 359 OptionsPageUIHandler::OptionsPageUIHandler() { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 // Add only if handler's service is enabled. | 629 // Add only if handler's service is enabled. |
| 608 if (handler->IsEnabled()) { | 630 if (handler->IsEnabled()) { |
| 609 // Add handler to the list and also pass the ownership. | 631 // Add handler to the list and also pass the ownership. |
| 610 web_ui()->AddMessageHandler(std::move(handler)); | 632 web_ui()->AddMessageHandler(std::move(handler)); |
| 611 handler_raw->GetLocalizedValues(localized_strings); | 633 handler_raw->GetLocalizedValues(localized_strings); |
| 612 handlers_.push_back(handler_raw); | 634 handlers_.push_back(handler_raw); |
| 613 } | 635 } |
| 614 } | 636 } |
| 615 | 637 |
| 616 } // namespace options | 638 } // namespace options |
| OLD | NEW |