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

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

Issue 1257633002: Componentize VersionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lost changes to //chrome/common/BUILD.gn and fix compilation of app_window_intercept_all_keys_u… Created 5 years, 4 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/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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 accel_map_[ui::Accelerator( 137 accel_map_[ui::Accelerator(
138 ui::VKEY_B, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN)] = 138 ui::VKEY_B, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN)] =
139 kAccelNameToggleEasyBootstrap; 139 kAccelNameToggleEasyBootstrap;
140 140
141 accel_map_[ui::Accelerator(ui::VKEY_LEFT, ui::EF_NONE)] = 141 accel_map_[ui::Accelerator(ui::VKEY_LEFT, ui::EF_NONE)] =
142 kAccelFocusPrev; 142 kAccelFocusPrev;
143 accel_map_[ui::Accelerator(ui::VKEY_RIGHT, ui::EF_NONE)] = 143 accel_map_[ui::Accelerator(ui::VKEY_RIGHT, ui::EF_NONE)] =
144 kAccelFocusNext; 144 kAccelFocusNext;
145 145
146 // Ctrl-Alt-Shift-W for canary/dev builds only. 146 // Ctrl-Alt-Shift-W for canary/dev builds only.
147 const chrome::VersionInfo::Channel channel = 147 const version_info::Channel channel = chrome::VersionInfo::GetChannel();
148 chrome::VersionInfo::GetChannel(); 148 if (channel != version_info::CHANNEL_STABLE &&
149 if (channel != chrome::VersionInfo::CHANNEL_STABLE && 149 channel != version_info::CHANNEL_BETA) {
150 channel != chrome::VersionInfo::CHANNEL_BETA) {
151 accel_map_[ui::Accelerator( 150 accel_map_[ui::Accelerator(
152 ui::VKEY_W, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | 151 ui::VKEY_W, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
153 ui::EF_SHIFT_DOWN)] = kAccelNameToggleWebviewSignin; 152 ui::EF_SHIFT_DOWN)] = kAccelNameToggleWebviewSignin;
154 } 153 }
155 154
156 // Use KEY_RELEASED because Gaia consumes KEY_PRESSED for up/down key. 155 // Use KEY_RELEASED because Gaia consumes KEY_PRESSED for up/down key.
157 ui::Accelerator key_up(ui::VKEY_UP, ui::EF_NONE); 156 ui::Accelerator key_up(ui::VKEY_UP, ui::EF_NONE);
158 key_up.set_type(ui::ET_KEY_RELEASED); 157 key_up.set_type(ui::ET_KEY_RELEASED);
159 ui::Accelerator key_down(ui::VKEY_DOWN, ui::EF_NONE); 158 ui::Accelerator key_down(ui::VKEY_DOWN, ui::EF_NONE);
160 key_down.set_type(ui::ET_KEY_RELEASED); 159 key_down.set_type(ui::ET_KEY_RELEASED);
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 webui_visible_ = true; 521 webui_visible_ = true;
523 } 522 }
524 523
525 void WebUILoginView::ReturnFocus(bool reverse) { 524 void WebUILoginView::ReturnFocus(bool reverse) {
526 // Return the focus to the web contents. 525 // Return the focus to the web contents.
527 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 526 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
528 GetWidget()->Activate(); 527 GetWidget()->Activate();
529 } 528 }
530 529
531 } // namespace chromeos 530 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698