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

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

Issue 10116018: Fix uber tray to accept focus via tab selection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix newline Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 if (web_ui) 310 if (web_ui)
311 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); 311 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors");
312 } 312 }
313 } 313 }
314 314
315 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { 315 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const {
316 return true; 316 return true;
317 } 317 }
318 318
319 bool WebUILoginView::TakeFocus(bool reverse) { 319 bool WebUILoginView::TakeFocus(bool reverse) {
320 ash::SystemTray* tray = ash::Shell::GetInstance()->tray();
321 if (tray) {
322 tray->SetNextFocusableView(this);
323 ash::Shell::GetInstance()->RotateFocus(reverse ? ash::Shell::BACKWARD :
324 ash::Shell::FORWARD);
325 }
326
320 return true; 327 return true;
321 } 328 }
322 329
323 void WebUILoginView::ReturnFocus(bool reverse) { 330 void WebUILoginView::ReturnFocus(bool reverse) {
324 // Return the focus to the web contents. 331 // Return the focus to the web contents.
325 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 332 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
326 GetWidget()->Activate(); 333 GetWidget()->Activate();
327 } 334 }
328 335
329 } // namespace chromeos 336 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698