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

Unified Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 2814863002: cros: Allow JS to control virtual keyboard on sign-in screen. (Closed)
Patch Set: Remove login_display_host_impl.cc keyboard logic Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/ui/login_display_host_impl.cc
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
index a6bcc1fd01e8878c9bd3a987f69b6bcf14bff2e0..37f5081ed5c2f8386517074aa6a9b1b50bfc9994 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
@@ -373,15 +373,7 @@ LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& wallpaper_bounds)
DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
CrasAudioHandler::Get()->AddAudioObserver(this);
- if (keyboard::KeyboardController::GetInstance()) {
- keyboard::KeyboardController::GetInstance()->AddObserver(this);
- is_observing_keyboard_ = true;
- }
- if (!ash_util::IsRunningInMash())
- ash::Shell::Get()->AddShellObserver(this);
- else
- NOTIMPLEMENTED();
display::Screen::GetScreen()->AddObserver(this);
// We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING
@@ -492,15 +484,6 @@ LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& wallpaper_bounds)
LoginDisplayHostImpl::~LoginDisplayHostImpl() {
DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
CrasAudioHandler::Get()->RemoveAudioObserver(this);
- if (keyboard::KeyboardController::GetInstance() && is_observing_keyboard_) {
- keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
- is_observing_keyboard_ = false;
- }
-
- if (!ash_util::IsRunningInMash())
- ash::Shell::Get()->RemoveShellObserver(this);
- else
- NOTIMPLEMENTED();
display::Screen::GetScreen()->RemoveObserver(this);
if (login_view_ && login_window_)
@@ -1022,43 +1005,6 @@ void LoginDisplayHostImpl::OnActiveOutputNodeChanged() {
}
////////////////////////////////////////////////////////////////////////////////
-// LoginDisplayHostImpl, ash::ShellObserver:
-
-void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(
- bool activated,
- ash::WmWindow* root_window) {
- if (keyboard::KeyboardController::GetInstance()) {
- if (activated) {
- if (!is_observing_keyboard_) {
- keyboard::KeyboardController::GetInstance()->AddObserver(this);
- is_observing_keyboard_ = true;
- }
- } else {
- keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
- is_observing_keyboard_ = false;
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
-
-void LoginDisplayHostImpl::OnKeyboardBoundsChanging(
- const gfx::Rect& new_bounds) {
- if (new_bounds.IsEmpty()) {
- // Keyboard has been hidden.
- if (GetOobeUI())
- GetOobeUI()->GetCoreOobeView()->ShowControlBar(true);
- } else if (!new_bounds.IsEmpty()) {
- // Keyboard has been shown.
- if (GetOobeUI())
- GetOobeUI()->GetCoreOobeView()->ShowControlBar(false);
- }
-}
-
-void LoginDisplayHostImpl::OnKeyboardClosed() {}
-
-////////////////////////////////////////////////////////////////////////////////
// LoginDisplayHostImpl, display::DisplayObserver:
void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) {
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_display_host_impl.h ('k') | chrome/browser/chromeos/login/ui/webui_login_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698