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

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

Issue 219503003: Make keyboard controller a singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix root window controller unittets. Created 6 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/login_display_host_impl.cc
diff --git a/chrome/browser/chromeos/login/login_display_host_impl.cc b/chrome/browser/chromeos/login/login_display_host_impl.cc
index 5095a5a07187cfaeefd80f39a1a462054093aca4..76d675d85cf5a1eb0cc0c727183a06a20a09bee6 100644
--- a/chrome/browser/chromeos/login/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/login_display_host_impl.cc
@@ -326,8 +326,8 @@ LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& background_bounds)
is_observing_keyboard_(false) {
DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
CrasAudioHandler::Get()->AddAudioObserver(this);
- if (ash::Shell::GetInstance()->keyboard_controller()) {
- ash::Shell::GetInstance()->keyboard_controller()->AddObserver(this);
+ if (keyboard::KeyboardController::GetInstance()) {
+ keyboard::KeyboardController::GetInstance()->AddObserver(this);
is_observing_keyboard_ = true;
}
@@ -427,9 +427,8 @@ LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& background_bounds)
LoginDisplayHostImpl::~LoginDisplayHostImpl() {
DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
CrasAudioHandler::Get()->RemoveAudioObserver(this);
- if (ash::Shell::GetInstance()->keyboard_controller() &&
- is_observing_keyboard_) {
- ash::Shell::GetInstance()->keyboard_controller()->RemoveObserver(this);
+ if (keyboard::KeyboardController::GetInstance() && is_observing_keyboard_) {
+ keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
is_observing_keyboard_ = false;
}
@@ -856,14 +855,14 @@ void LoginDisplayHostImpl::OnActiveOutputNodeChanged() {
// implementation:
void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(bool activated) {
- if (ash::Shell::GetInstance()->keyboard_controller()) {
+ if (keyboard::KeyboardController::GetInstance()) {
if (activated) {
if (!is_observing_keyboard_) {
- ash::Shell::GetInstance()->keyboard_controller()->AddObserver(this);
+ keyboard::KeyboardController::GetInstance()->AddObserver(this);
is_observing_keyboard_ = true;
}
} else {
- ash::Shell::GetInstance()->keyboard_controller()->RemoveObserver(this);
+ keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
is_observing_keyboard_ = false;
}
}
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_engine.cc ('k') | chrome/browser/extensions/api/input/input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698