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

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

Issue 2118593002: mash: Migrate ShellDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 5 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 14993a9369887f2c48cf03978b8d1a7fc34e4d53..6245d6f4f5dd7e465b13c1782a2607937d0cf034 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
@@ -9,6 +9,7 @@
#include "ash/audio/sounds.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/wm_shell.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/user_wallpaper_delegate.h"
#include "ash/shell.h"
@@ -299,12 +300,10 @@ LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& background_bounds)
is_observing_keyboard_ = true;
}
- if (!chrome::IsRunningInMash()) {
- ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(
- this);
- } else {
+ if (!chrome::IsRunningInMash())
+ ash::WmShell::Get()->delegate()->AddVirtualKeyboardStateObserver(this);
+ else
NOTIMPLEMENTED();
- }
display::Screen::GetScreen()->AddObserver(this);
// We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING
@@ -420,12 +419,10 @@ LoginDisplayHostImpl::~LoginDisplayHostImpl() {
is_observing_keyboard_ = false;
}
- if (!chrome::IsRunningInMash()) {
- ash::Shell::GetInstance()->delegate()->RemoveVirtualKeyboardStateObserver(
- this);
- } else {
+ if (!chrome::IsRunningInMash())
+ ash::WmShell::Get()->delegate()->RemoveVirtualKeyboardStateObserver(this);
+ else
NOTIMPLEMENTED();
- }
display::Screen::GetScreen()->RemoveObserver(this);
if (login_view_ && login_window_)
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_display_host_impl.h ('k') | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698