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

Side by Side Diff: chrome/browser/chromeos/login/ui/webui_login_view.cc

Issue 2383953002: [Bootstrapping] Introduce an accelerator to put a ChromeOS device into Slave OOBE process. (Closed)
Patch Set: Address achuith@'s 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/ui/webui_login_view.h" 5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
6 6
7 #include "ash/common/focus_cycler.h" 7 #include "ash/common/focus_cycler.h"
8 #include "ash/common/system/status_area_widget_delegate.h" 8 #include "ash/common/system/status_area_widget_delegate.h"
9 #include "ash/common/system/tray/system_tray.h" 9 #include "ash/common/system/tray/system_tray.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const char kAccelNameEnrollment[] = "enrollment"; 72 const char kAccelNameEnrollment[] = "enrollment";
73 const char kAccelNameKioskEnable[] = "kiosk_enable"; 73 const char kAccelNameKioskEnable[] = "kiosk_enable";
74 const char kAccelNameVersion[] = "version"; 74 const char kAccelNameVersion[] = "version";
75 const char kAccelNameReset[] = "reset"; 75 const char kAccelNameReset[] = "reset";
76 const char kAccelNameDeviceRequisition[] = "device_requisition"; 76 const char kAccelNameDeviceRequisition[] = "device_requisition";
77 const char kAccelNameDeviceRequisitionRemora[] = "device_requisition_remora"; 77 const char kAccelNameDeviceRequisitionRemora[] = "device_requisition_remora";
78 const char kAccelNameDeviceRequisitionShark[] = "device_requisition_shark"; 78 const char kAccelNameDeviceRequisitionShark[] = "device_requisition_shark";
79 const char kAccelNameAppLaunchBailout[] = "app_launch_bailout"; 79 const char kAccelNameAppLaunchBailout[] = "app_launch_bailout";
80 const char kAccelNameAppLaunchNetworkConfig[] = "app_launch_network_config"; 80 const char kAccelNameAppLaunchNetworkConfig[] = "app_launch_network_config";
81 const char kAccelNameToggleEasyBootstrap[] = "toggle_easy_bootstrap"; 81 const char kAccelNameToggleEasyBootstrap[] = "toggle_easy_bootstrap";
82 const char kAccelNameBootstrappingSlave[] = "bootstrapping_slave";
82 83
83 // A class to change arrow key traversal behavior when it's alive. 84 // A class to change arrow key traversal behavior when it's alive.
84 class ScopedArrowKeyTraversal { 85 class ScopedArrowKeyTraversal {
85 public: 86 public:
86 explicit ScopedArrowKeyTraversal(bool new_arrow_key_tranversal_enabled) 87 explicit ScopedArrowKeyTraversal(bool new_arrow_key_tranversal_enabled)
87 : previous_arrow_key_traversal_enabled_( 88 : previous_arrow_key_traversal_enabled_(
88 views::FocusManager::arrow_key_traversal_enabled()) { 89 views::FocusManager::arrow_key_traversal_enabled()) {
89 views::FocusManager::set_arrow_key_traversal_enabled( 90 views::FocusManager::set_arrow_key_traversal_enabled(
90 new_arrow_key_tranversal_enabled); 91 new_arrow_key_tranversal_enabled);
91 } 92 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 kAccelNameDeviceRequisitionShark; 217 kAccelNameDeviceRequisitionShark;
217 218
218 accel_map_[ui::Accelerator(ui::VKEY_S, 219 accel_map_[ui::Accelerator(ui::VKEY_S,
219 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)] = 220 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)] =
220 kAccelNameAppLaunchBailout; 221 kAccelNameAppLaunchBailout;
221 222
222 accel_map_[ui::Accelerator(ui::VKEY_N, 223 accel_map_[ui::Accelerator(ui::VKEY_N,
223 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)] = 224 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)] =
224 kAccelNameAppLaunchNetworkConfig; 225 kAccelNameAppLaunchNetworkConfig;
225 226
227 accel_map_[ui::Accelerator(
228 ui::VKEY_S, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN)] =
229 kAccelNameBootstrappingSlave;
230
226 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i) 231 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i)
227 AddAccelerator(i->first); 232 AddAccelerator(i->first);
228 } 233 }
229 234
230 WebUILoginView::~WebUILoginView() { 235 WebUILoginView::~WebUILoginView() {
231 FOR_EACH_OBSERVER(web_modal::ModalDialogHostObserver, 236 FOR_EACH_OBSERVER(web_modal::ModalDialogHostObserver,
232 observer_list_, 237 observer_list_,
233 OnHostDestroying()); 238 OnHostDestroying());
234 239
235 if (!chrome::IsRunningInMash() && 240 if (!chrome::IsRunningInMash() &&
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 if (should_emit_login_prompt_visible_) { 611 if (should_emit_login_prompt_visible_) {
607 VLOG(1) << "Login WebUI >> login-prompt-visible"; 612 VLOG(1) << "Login WebUI >> login-prompt-visible";
608 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 613 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
609 EmitLoginPromptVisible(); 614 EmitLoginPromptVisible();
610 } 615 }
611 616
612 webui_visible_ = true; 617 webui_visible_ = true;
613 } 618 }
614 619
615 } // namespace chromeos 620 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/startup_utils.cc ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698