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

Side by Side Diff: chrome/browser/chromeos/login/lock/webui_screen_locker.cc

Issue 2747543002: ash: Start/stop observing KeyboardController via ShellObserver (Closed)
Patch Set: update LockLayoutManager to use similar logic Created 3 years, 9 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/lock/webui_screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h"
6 6
7 #include "ash/common/wm_shell.h" 7 #include "ash/common/wm_shell.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/chromeos/power/power_event_observer.h" 9 #include "ash/system/chromeos/power/power_event_observer.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID && 409 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID &&
410 status != base::TERMINATION_STATUS_NORMAL_TERMINATION) { 410 status != base::TERMINATION_STATUS_NORMAL_TERMINATION) {
411 LOG(ERROR) << "Renderer crash on lock screen; signing out"; 411 LOG(ERROR) << "Renderer crash on lock screen; signing out";
412 Signout(); 412 Signout();
413 } 413 }
414 } 414 }
415 415
416 //////////////////////////////////////////////////////////////////////////////// 416 ////////////////////////////////////////////////////////////////////////////////
417 // ash::ShellObserver: 417 // ash::ShellObserver:
418 418
419 void WebUIScreenLocker::OnVirtualKeyboardStateChanged(bool activated) { 419 void WebUIScreenLocker::OnVirtualKeyboardStateChanged(
420 bool activated,
421 ash::WmWindow* root_window) {
420 if (keyboard::KeyboardController::GetInstance()) { 422 if (keyboard::KeyboardController::GetInstance()) {
421 if (activated) { 423 if (activated) {
422 if (!is_observing_keyboard_) { 424 if (!is_observing_keyboard_) {
423 keyboard::KeyboardController::GetInstance()->AddObserver(this); 425 keyboard::KeyboardController::GetInstance()->AddObserver(this);
424 is_observing_keyboard_ = true; 426 is_observing_keyboard_ = true;
425 } 427 }
426 } else { 428 } else {
427 keyboard::KeyboardController::GetInstance()->RemoveObserver(this); 429 keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
428 is_observing_keyboard_ = false; 430 is_observing_keyboard_ = false;
429 } 431 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 471 }
470 472
471 if (GetOobeUI()) { 473 if (GetOobeUI()) {
472 const gfx::Size& size = primary_display.size(); 474 const gfx::Size& size = primary_display.size();
473 GetOobeUI()->GetCoreOobeView()->SetClientAreaSize(size.width(), 475 GetOobeUI()->GetCoreOobeView()->SetClientAreaSize(size.width(),
474 size.height()); 476 size.height());
475 } 477 }
476 } 478 }
477 479
478 } // namespace chromeos 480 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/webui_screen_locker.h ('k') | chrome/browser/chromeos/login/ui/login_display_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698