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

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: Address comments by brettw 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 accel_map_[ui::Accelerator( 136 accel_map_[ui::Accelerator(
137 ui::VKEY_B, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN)] = 137 ui::VKEY_B, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN)] =
138 kAccelNameToggleEasyBootstrap; 138 kAccelNameToggleEasyBootstrap;
139 139
140 accel_map_[ui::Accelerator(ui::VKEY_LEFT, ui::EF_NONE)] = 140 accel_map_[ui::Accelerator(ui::VKEY_LEFT, ui::EF_NONE)] =
141 kAccelFocusPrev; 141 kAccelFocusPrev;
142 accel_map_[ui::Accelerator(ui::VKEY_RIGHT, ui::EF_NONE)] = 142 accel_map_[ui::Accelerator(ui::VKEY_RIGHT, ui::EF_NONE)] =
143 kAccelFocusNext; 143 kAccelFocusNext;
144 144
145 // Ctrl-Alt-Shift-W for canary/dev builds only. 145 // Ctrl-Alt-Shift-W for canary/dev builds only.
146 const chrome::VersionInfo::Channel channel = 146 const version_info::Channel channel = chrome::VersionInfo::GetChannel();
147 chrome::VersionInfo::GetChannel(); 147 if (channel != version_info::CHANNEL_STABLE &&
148 if (channel != chrome::VersionInfo::CHANNEL_STABLE && 148 channel != version_info::CHANNEL_BETA) {
149 channel != chrome::VersionInfo::CHANNEL_BETA) {
150 accel_map_[ui::Accelerator( 149 accel_map_[ui::Accelerator(
151 ui::VKEY_W, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | 150 ui::VKEY_W, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN |
152 ui::EF_SHIFT_DOWN)] = kAccelNameToggleWebviewSignin; 151 ui::EF_SHIFT_DOWN)] = kAccelNameToggleWebviewSignin;
153 } 152 }
154 153
155 // Use KEY_RELEASED because Gaia consumes KEY_PRESSED for up/down key. 154 // Use KEY_RELEASED because Gaia consumes KEY_PRESSED for up/down key.
156 ui::Accelerator key_up(ui::VKEY_UP, ui::EF_NONE); 155 ui::Accelerator key_up(ui::VKEY_UP, ui::EF_NONE);
157 key_up.set_type(ui::ET_KEY_RELEASED); 156 key_up.set_type(ui::ET_KEY_RELEASED);
158 ui::Accelerator key_down(ui::VKEY_DOWN, ui::EF_NONE); 157 ui::Accelerator key_down(ui::VKEY_DOWN, ui::EF_NONE);
159 key_down.set_type(ui::ET_KEY_RELEASED); 158 key_down.set_type(ui::ET_KEY_RELEASED);
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 webui_visible_ = true; 517 webui_visible_ = true;
519 } 518 }
520 519
521 void WebUILoginView::ReturnFocus(bool reverse) { 520 void WebUILoginView::ReturnFocus(bool reverse) {
522 // Return the focus to the web contents. 521 // Return the focus to the web contents.
523 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 522 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
524 GetWidget()->Activate(); 523 GetWidget()->Activate();
525 } 524 }
526 525
527 } // namespace chromeos 526 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698