| Index: chrome/browser/ui/webui/options/options_ui.cc
|
| diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc
|
| index d1498e4776ba0592da592799c4f3ae5dfa4bed05..10494892c38c52f3159605eb111ece6ff11ffa7b 100644
|
| --- a/chrome/browser/ui/webui/options/options_ui.cc
|
| +++ b/chrome/browser/ui/webui/options/options_ui.cc
|
| @@ -63,6 +63,7 @@
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_contents_delegate.h"
|
| #include "content/public/browser/web_ui.h"
|
| +#include "content/public/browser/web_ui_data_source.h"
|
| #include "grit/options_resources.h"
|
| #include "grit/theme_resources.h"
|
| #include "net/base/escape.h"
|
| @@ -117,6 +118,28 @@ namespace {
|
|
|
| const char kLocalizedStringsFile[] = "strings.js";
|
| const char kOptionsBundleJsFile[] = "options_bundle.js";
|
| +const char kPinKeyboardHTMLPath[] = "people_page/pin_keyboard.html";
|
| +const char kPinKeyboardJSPath[] = "people_page/pin_keyboard.js";
|
| +
|
| +const char kPasswordPromptDialogHTMLPath[] =
|
| + "people_page/password_prompt_dialog.html";
|
| +const char kPasswordPromptDialogJSPath[] =
|
| + "people_page/password_prompt_dialog.js";
|
| +const char kLockStateBehaviorHTMLPath[] =
|
| + "people_page/lock_state_behavior.html";
|
| +const char kLockStateBehaviorJSPath[] = "people_page/lock_state_behavior.js";
|
| +const char kLockScreenHTMLPath[] = "people_page/lock_screen.html";
|
| +const char kLockScreenJSPath[] = "people_page/lock_screen.js";
|
| +const char kSetupPinHTMLPath[] = "people_page/setup_pin_dialog.html";
|
| +const char kSetupPinJSPath[] = "people_page/setup_pin_dialog.js";
|
| +const char kSettingsRouteHTMLPath[] = "route.html";
|
| +const char kSettingsRouteJSPath[] = "route.js";
|
| +const char kSettingsSharedCSSHTMLPath[] = "settings_shared_css.html";
|
| +const char kSettingsVarsCSSHTMLPath[] = "settings_vars_css.html";
|
| +const char kSettingsPrefsBehaviorHTMLPath[] = "prefs/prefs_behavior.html";
|
| +const char kSettingsPrefsBehaviorJSPath[] = "prefs/prefs_behavior.js";
|
| +const char kSettingsPrefsTypesHTMLPath[] = "prefs/prefs_types.html";
|
| +const char kSettingsPrefsTypesJSPath[] = "prefs/prefs_types.js";
|
|
|
| } // namespace
|
|
|
| @@ -180,6 +203,78 @@ void OptionsUIHTMLSource::StartDataRequest(
|
| // Return (and cache) the options javascript code.
|
| response_bytes = ui::ResourceBundle::GetSharedInstance().
|
| LoadDataResourceBytes(IDR_OPTIONS_BUNDLE_JS);
|
| + } else if (path == kPinKeyboardJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_PIN_KEYBOARD_JS);
|
| + } else if (path == kPinKeyboardHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_PIN_KEYBOARD_HTML);
|
| + } else if (path == kPasswordPromptDialogJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_JS);
|
| + } else if (path == kPasswordPromptDialogHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_HTML);
|
| + } else if (path == kSetupPinJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_SETUP_PIN_DIALOG_JS);
|
| + } else if (path == kSetupPinHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_SETUP_PIN_DIALOG_HTML);
|
| + } else if (path == kLockStateBehaviorJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_LOCK_STATE_BEHAVIOR_JS);
|
| + } else if (path == kLockStateBehaviorHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_LOCK_STATE_BEHAVIOR_HTML);
|
| + } else if (path == kLockScreenJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_LOCK_SCREEN_JS);
|
| + } else if (path == kLockScreenHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_LOCK_SCREEN_HTML);
|
| + } else if (path == kSettingsRouteJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_ROUTE_JS);
|
| + } else if (path == kSettingsRouteHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_OPTIONS_ROUTE_HTML);
|
| + } else if (path == kSettingsVarsCSSHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_SETTINGS_VARS_CSS_HTML);
|
| + } else if (path == kSettingsSharedCSSHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_SETTINGS_SHARED_CSS_HTML);
|
| + } else if (path == kSettingsPrefsBehaviorJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_SETTINGS_PREFS_BEHAVIOR_JS);
|
| + } else if (path == kSettingsPrefsBehaviorHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_SETTINGS_PREFS_BEHAVIOR_HTML);
|
| + } else if (path == kSettingsPrefsTypesJSPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_SETTINGS_PREFS_TYPES_JS);
|
| + } else if (path == kSettingsPrefsTypesHTMLPath) {
|
| + response_bytes =
|
| + ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_SETTINGS_PREFS_TYPES_HTML);
|
| } else {
|
| // Return (and cache) the main options html page as the default.
|
| response_bytes = ui::ResourceBundle::GetSharedInstance().
|
|
|