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

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

Issue 2351353002: Update WebUILogin Focus for Mash (Closed)
Patch Set: Created 4 years, 3 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 | « 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 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" 7 #include "ash/common/focus_cycler.h"
8 #include "ash/common/system/status_area_widget_delegate.h" 8 #include "ash/common/system/status_area_widget_delegate.h"
9 #include "ash/common/system/tray/system_tray.h" 9 #include "ash/common/system/tray/system_tray.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 webui_login_->RequestFocus(); 348 webui_login_->RequestFocus();
349 349
350 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track 350 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track
351 // when RenderView is created. 351 // when RenderView is created.
352 GetWebContents() 352 GetWebContents()
353 ->GetRenderViewHost() 353 ->GetRenderViewHost()
354 ->GetWidget() 354 ->GetWidget()
355 ->GetView() 355 ->GetView()
356 ->SetBackgroundColor(SK_ColorTRANSPARENT); 356 ->SetBackgroundColor(SK_ColorTRANSPARENT);
357 357
358 // There is no Shell instance while running in mash.
359 if (chrome::IsRunningInMash())
360 return;
361
358 ash::StatusAreaWidgetDelegate* status_area_widget_delegate = 362 ash::StatusAreaWidgetDelegate* status_area_widget_delegate =
359 GetStatusAreaWidgetDelegate(); 363 GetStatusAreaWidgetDelegate();
360 DCHECK(status_area_widget_delegate); 364 DCHECK(status_area_widget_delegate);
361 cycle_focus_traversable_.reset(new CycleFocusTraversable(this)); 365 cycle_focus_traversable_.reset(new CycleFocusTraversable(this));
362 status_area_focus_traversable_.reset( 366 status_area_focus_traversable_.reset(
363 new StatusAreaFocusTraversable(status_area_widget_delegate, this)); 367 new StatusAreaFocusTraversable(status_area_widget_delegate, this));
364 status_area_widget_delegate->set_custom_focus_traversable( 368 status_area_widget_delegate->set_custom_focus_traversable(
365 status_area_focus_traversable_.get()); 369 status_area_focus_traversable_.get());
366 } 370 }
367 371
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 if (should_emit_login_prompt_visible_) { 606 if (should_emit_login_prompt_visible_) {
603 VLOG(1) << "Login WebUI >> login-prompt-visible"; 607 VLOG(1) << "Login WebUI >> login-prompt-visible";
604 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 608 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
605 EmitLoginPromptVisible(); 609 EmitLoginPromptVisible();
606 } 610 }
607 611
608 webui_visible_ = true; 612 webui_visible_ = true;
609 } 613 }
610 614
611 } // namespace chromeos 615 } // 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