Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: chrome/browser/ui/webui/options/options_ui.cc

Issue 2157673002: Browser tests for the quick_unlock settings pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pin-unlock-quick-unlock-interface
Patch Set: Address comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #endif 111 #endif
112 112
113 using content::RenderViewHost; 113 using content::RenderViewHost;
114 114
115 namespace { 115 namespace {
116 116
117 const char kLocalizedStringsFile[] = "strings.js"; 117 const char kLocalizedStringsFile[] = "strings.js";
118 const char kOptionsBundleJsFile[] = "options_bundle.js"; 118 const char kOptionsBundleJsFile[] = "options_bundle.js";
119 119
120 #if defined(OS_CHROMEOS) 120 #if defined(OS_CHROMEOS)
121 constexpr char kIconsHTMLPath[] = "icons.html";
121 constexpr char kPinKeyboardHTMLPath[] = "people_page/pin_keyboard.html"; 122 constexpr char kPinKeyboardHTMLPath[] = "people_page/pin_keyboard.html";
122 constexpr char kPinKeyboardJSPath[] = "people_page/pin_keyboard.js"; 123 constexpr char kPinKeyboardJSPath[] = "people_page/pin_keyboard.js";
123 constexpr char kPasswordPromptDialogHTMLPath[] = 124 constexpr char kPasswordPromptDialogHTMLPath[] =
124 "people_page/password_prompt_dialog.html"; 125 "people_page/password_prompt_dialog.html";
125 constexpr char kPasswordPromptDialogJSPath[] = 126 constexpr char kPasswordPromptDialogJSPath[] =
126 "people_page/password_prompt_dialog.js"; 127 "people_page/password_prompt_dialog.js";
127 constexpr char kLockStateBehaviorHTMLPath[] = 128 constexpr char kLockStateBehaviorHTMLPath[] =
128 "people_page/lock_state_behavior.html"; 129 "people_page/lock_state_behavior.html";
129 constexpr char kLockStateBehaviorJSPath[] = 130 constexpr char kLockStateBehaviorJSPath[] =
130 "people_page/lock_state_behavior.js"; 131 "people_page/lock_state_behavior.js";
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 243 }
243 244
244 bool OptionsUIHTMLSource::ShouldDenyXFrameOptions() const { 245 bool OptionsUIHTMLSource::ShouldDenyXFrameOptions() const {
245 return false; 246 return false;
246 } 247 }
247 248
248 OptionsUIHTMLSource::~OptionsUIHTMLSource() {} 249 OptionsUIHTMLSource::~OptionsUIHTMLSource() {}
249 250
250 void OptionsUIHTMLSource::CreateDataSourceMap() { 251 void OptionsUIHTMLSource::CreateDataSourceMap() {
251 #if defined(OS_CHROMEOS) 252 #if defined(OS_CHROMEOS)
253 path_to_idr_map_[kIconsHTMLPath] = IDR_OPTIONS_ICONS_HTML;
252 path_to_idr_map_[kPinKeyboardHTMLPath] = IDR_OPTIONS_PIN_KEYBOARD_HTML; 254 path_to_idr_map_[kPinKeyboardHTMLPath] = IDR_OPTIONS_PIN_KEYBOARD_HTML;
253 path_to_idr_map_[kPinKeyboardJSPath] = IDR_OPTIONS_PIN_KEYBOARD_JS; 255 path_to_idr_map_[kPinKeyboardJSPath] = IDR_OPTIONS_PIN_KEYBOARD_JS;
254 path_to_idr_map_[kPasswordPromptDialogHTMLPath] = 256 path_to_idr_map_[kPasswordPromptDialogHTMLPath] =
255 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_HTML; 257 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_HTML;
256 path_to_idr_map_[kPasswordPromptDialogJSPath] = 258 path_to_idr_map_[kPasswordPromptDialogJSPath] =
257 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_JS; 259 IDR_OPTIONS_PASSWORD_PROMPT_DIALOG_JS;
258 path_to_idr_map_[kLockStateBehaviorHTMLPath] = 260 path_to_idr_map_[kLockStateBehaviorHTMLPath] =
259 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_HTML; 261 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_HTML;
260 path_to_idr_map_[kLockStateBehaviorJSPath] = 262 path_to_idr_map_[kLockStateBehaviorJSPath] =
261 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_JS; 263 IDR_OPTIONS_LOCK_STATE_BEHAVIOR_JS;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 // Add only if handler's service is enabled. 569 // Add only if handler's service is enabled.
568 if (handler->IsEnabled()) { 570 if (handler->IsEnabled()) {
569 // Add handler to the list and also pass the ownership. 571 // Add handler to the list and also pass the ownership.
570 web_ui()->AddMessageHandler(handler.release()); 572 web_ui()->AddMessageHandler(handler.release());
571 handler_raw->GetLocalizedValues(localized_strings); 573 handler_raw->GetLocalizedValues(localized_strings);
572 handlers_.push_back(handler_raw); 574 handlers_.push_back(handler_raw);
573 } 575 }
574 } 576 }
575 577
576 } // namespace options 578 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698