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

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

Issue 2075923002: mash: Convert FocusCycler to wm common types and move to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
« no previous file with comments | « ash/wm/window_cycle_controller_unittest.cc ('k') | 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 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"
8 #include "ash/common/wm_shell.h"
7 #include "ash/shell.h" 9 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
9 #include "base/bind.h" 11 #include "base/bind.h"
10 #include "base/callback.h" 12 #include "base/callback.h"
11 #include "base/i18n/rtl.h" 13 #include "base/i18n/rtl.h"
12 #include "base/logging.h" 14 #include "base/logging.h"
13 #include "base/macros.h" 15 #include "base/macros.h"
14 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
15 #include "base/trace_event/trace_event.h" 17 #include "base/trace_event/trace_event.h"
16 #include "base/values.h" 18 #include "base/values.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 return false; 438 return false;
437 439
438 // Focus is accepted, but the Ash system tray is not available in Mash, so 440 // Focus is accepted, but the Ash system tray is not available in Mash, so
439 // exit early. 441 // exit early.
440 if (chrome::IsRunningInMash()) 442 if (chrome::IsRunningInMash())
441 return true; 443 return true;
442 444
443 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); 445 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
444 if (tray && tray->GetWidget()->IsVisible()) { 446 if (tray && tray->GetWidget()->IsVisible()) {
445 tray->SetNextFocusableView(this); 447 tray->SetNextFocusableView(this);
446 ash::Shell::GetInstance()->RotateFocus(reverse ? ash::Shell::BACKWARD : 448 ash::WmShell::Get()->focus_cycler()->RotateFocus(
447 ash::Shell::FORWARD); 449 reverse ? ash::FocusCycler::BACKWARD : ash::FocusCycler::FORWARD);
448 } 450 }
449 451
450 return true; 452 return true;
451 } 453 }
452 454
453 void WebUILoginView::RequestMediaAccessPermission( 455 void WebUILoginView::RequestMediaAccessPermission(
454 WebContents* web_contents, 456 WebContents* web_contents,
455 const content::MediaStreamRequest& request, 457 const content::MediaStreamRequest& request,
456 const content::MediaResponseCallback& callback) { 458 const content::MediaResponseCallback& callback) {
457 MediaStreamDevicesController controller(web_contents, request, callback); 459 MediaStreamDevicesController controller(web_contents, request, callback);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 if (should_emit_login_prompt_visible_) { 551 if (should_emit_login_prompt_visible_) {
550 VLOG(1) << "Login WebUI >> login-prompt-visible"; 552 VLOG(1) << "Login WebUI >> login-prompt-visible";
551 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 553 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
552 EmitLoginPromptVisible(); 554 EmitLoginPromptVisible();
553 } 555 }
554 556
555 webui_visible_ = true; 557 webui_visible_ = true;
556 } 558 }
557 559
558 } // namespace chromeos 560 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698