| 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/chromeos/login/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/webui_login_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 content::NotificationService::AllSources()); | 125 content::NotificationService::AllSources()); |
| 126 | 126 |
| 127 accel_map_[ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE)] = | 127 accel_map_[ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE)] = |
| 128 kAccelNameCancel; | 128 kAccelNameCancel; |
| 129 accel_map_[ui::Accelerator(ui::VKEY_E, | 129 accel_map_[ui::Accelerator(ui::VKEY_E, |
| 130 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)] = | 130 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)] = |
| 131 kAccelNameEnrollment; | 131 kAccelNameEnrollment; |
| 132 accel_map_[ui::Accelerator(ui::VKEY_V, ui::EF_ALT_DOWN)] = | 132 accel_map_[ui::Accelerator(ui::VKEY_V, ui::EF_ALT_DOWN)] = |
| 133 kAccelNameVersion; | 133 kAccelNameVersion; |
| 134 accel_map_[ui::Accelerator(ui::VKEY_R, | 134 accel_map_[ui::Accelerator(ui::VKEY_R, |
| 135 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)] = | 135 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN)] = |
| 136 kAccelNameReset; | 136 kAccelNameReset; |
| 137 | 137 |
| 138 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i) | 138 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i) |
| 139 AddAccelerator(i->first); | 139 AddAccelerator(i->first); |
| 140 } | 140 } |
| 141 | 141 |
| 142 WebUILoginView::~WebUILoginView() { | 142 WebUILoginView::~WebUILoginView() { |
| 143 ash::SystemTray* tray = ash::Shell::GetInstance()->system_tray(); | 143 ash::SystemTray* tray = ash::Shell::GetInstance()->system_tray(); |
| 144 if (tray) | 144 if (tray) |
| 145 tray->SetNextFocusableView(NULL); | 145 tray->SetNextFocusableView(NULL); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 aura::Env::GetInstance()->set_render_white_bg(true); | 376 aura::Env::GetInstance()->set_render_white_bg(true); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void WebUILoginView::ReturnFocus(bool reverse) { | 379 void WebUILoginView::ReturnFocus(bool reverse) { |
| 380 // Return the focus to the web contents. | 380 // Return the focus to the web contents. |
| 381 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 381 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
| 382 GetWidget()->Activate(); | 382 GetWidget()->Activate(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace chromeos | 385 } // namespace chromeos |
| OLD | NEW |