Commit 9eda0c61 authored by pkotwicz's avatar pkotwicz Committed by Commit bot

Make login code not depend on Ash when use_athena=1

BUG=426561
TEST=None

Review URL: https://codereview.chromium.org/689683004

Cr-Commit-Position: refs/heads/master@{#302270}
parent 2f4ed501
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <vector> #include <vector>
#include "ash/ash_switches.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
...@@ -47,6 +46,10 @@ ...@@ -47,6 +46,10 @@
#include "ui/wm/core/wm_core_switches.h" #include "ui/wm/core/wm_core_switches.h"
#include "url/gurl.h" #include "url/gurl.h"
#if !defined(USE_ATHENA)
#include "ash/ash_switches.h"
#endif
using content::BrowserThread; using content::BrowserThread;
namespace chromeos { namespace chromeos {
...@@ -163,6 +166,7 @@ std::string DeriveCommandLine(const GURL& start_url, ...@@ -163,6 +166,7 @@ std::string DeriveCommandLine(const GURL& start_url,
#endif #endif
app_list::switches::kDisableSyncAppList, app_list::switches::kDisableSyncAppList,
app_list::switches::kEnableSyncAppList, app_list::switches::kEnableSyncAppList,
#if !defined(USE_ATHENA)
ash::switches::kAshDefaultWallpaperLarge, ash::switches::kAshDefaultWallpaperLarge,
ash::switches::kAshDefaultWallpaperSmall, ash::switches::kAshDefaultWallpaperSmall,
ash::switches::kAshGuestWallpaperLarge, ash::switches::kAshGuestWallpaperLarge,
...@@ -170,6 +174,7 @@ std::string DeriveCommandLine(const GURL& start_url, ...@@ -170,6 +174,7 @@ std::string DeriveCommandLine(const GURL& start_url,
ash::switches::kAshHostWindowBounds, ash::switches::kAshHostWindowBounds,
ash::switches::kAshTouchHud, ash::switches::kAshTouchHud,
ash::switches::kAuraLegacyPowerButton, ash::switches::kAuraLegacyPowerButton,
#endif
// Please keep these in alphabetical order. Non-UI Compositor switches // Please keep these in alphabetical order. Non-UI Compositor switches
// here should also be added to // here should also be added to
// content/browser/renderer_host/render_process_host_impl.cc. // content/browser/renderer_host/render_process_host_impl.cc.
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "chrome/browser/chromeos/login/helper.h" #include "chrome/browser/chromeos/login/helper.h"
#include "ash/shell.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
...@@ -20,7 +19,8 @@ ...@@ -20,7 +19,8 @@
namespace chromeos { namespace chromeos {
gfx::Rect CalculateScreenBounds(const gfx::Size& size) { gfx::Rect CalculateScreenBounds(const gfx::Size& size) {
gfx::Rect bounds(ash::Shell::GetScreen()->GetPrimaryDisplay().bounds()); gfx::Rect bounds =
gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().bounds();
if (!size.IsEmpty()) { if (!size.IsEmpty()) {
int horizontal_diff = bounds.width() - size.width(); int horizontal_diff = bounds.width() - size.width();
int vertical_diff = bounds.height() - size.height(); int vertical_diff = bounds.height() - size.height();
......
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
#include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h"
#include "ash/shell.h"
#include "ash/wm/lock_state_controller.h"
#include "ash/wm/lock_state_observer.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
...@@ -35,6 +32,11 @@ ...@@ -35,6 +32,11 @@
#include "ui/keyboard/keyboard_util.h" #include "ui/keyboard/keyboard_util.h"
#include "ui/views/controls/webview/webview.h" #include "ui/views/controls/webview/webview.h"
#if !defined(USE_ATHENA)
#include "ash/wm/lock_state_controller.h"
#include "ash/wm/lock_state_observer.h"
#endif
namespace { namespace {
// URL which corresponds to the login WebUI. // URL which corresponds to the login WebUI.
...@@ -80,7 +82,8 @@ WebUIScreenLocker::WebUIScreenLocker(ScreenLocker* screen_locker) ...@@ -80,7 +82,8 @@ WebUIScreenLocker::WebUIScreenLocker(ScreenLocker* screen_locker)
} }
void WebUIScreenLocker::LockScreen() { void WebUIScreenLocker::LockScreen() {
gfx::Rect bounds(ash::Shell::GetScreen()->GetPrimaryDisplay().bounds()); gfx::Rect bounds =
gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().bounds();
lock_time_ = base::TimeTicks::Now(); lock_time_ = base::TimeTicks::Now();
LockWindow* lock_window = LockWindow::Create(); LockWindow* lock_window = LockWindow::Create();
...@@ -303,6 +306,7 @@ void WebUIScreenLocker::OnLockWindowReady() { ...@@ -303,6 +306,7 @@ void WebUIScreenLocker::OnLockWindowReady() {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// SessionLockStateObserver override. // SessionLockStateObserver override.
#if !defined(USE_ATHENA)
void WebUIScreenLocker::OnLockStateEvent( void WebUIScreenLocker::OnLockStateEvent(
ash::LockStateObserver::EventType event) { ash::LockStateObserver::EventType event) {
if (event == ash::LockStateObserver::EVENT_LOCK_ANIMATION_FINISHED) { if (event == ash::LockStateObserver::EVENT_LOCK_ANIMATION_FINISHED) {
...@@ -312,6 +316,7 @@ void WebUIScreenLocker::OnLockStateEvent( ...@@ -312,6 +316,7 @@ void WebUIScreenLocker::OnLockStateEvent(
GetWebUI()->CallJavascriptFunction("cr.ui.Oobe.animateOnceFullyDisplayed"); GetWebUI()->CallJavascriptFunction("cr.ui.Oobe.animateOnceFullyDisplayed");
} }
} }
#endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// WidgetObserver override. // WidgetObserver override.
...@@ -350,6 +355,7 @@ void WebUIScreenLocker::RenderProcessGone(base::TerminationStatus status) { ...@@ -350,6 +355,7 @@ void WebUIScreenLocker::RenderProcessGone(base::TerminationStatus status) {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// ash::KeyboardStateObserver overrides. // ash::KeyboardStateObserver overrides.
#if !defined(USE_ATHENA)
void WebUIScreenLocker::OnVirtualKeyboardStateChanged(bool activated) { void WebUIScreenLocker::OnVirtualKeyboardStateChanged(bool activated) {
if (keyboard::KeyboardController::GetInstance()) { if (keyboard::KeyboardController::GetInstance()) {
if (activated) { if (activated) {
...@@ -363,6 +369,7 @@ void WebUIScreenLocker::OnVirtualKeyboardStateChanged(bool activated) { ...@@ -363,6 +369,7 @@ void WebUIScreenLocker::OnVirtualKeyboardStateChanged(bool activated) {
} }
} }
} }
#endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// keyboard::KeyboardControllerObserver overrides. // keyboard::KeyboardControllerObserver overrides.
......
...@@ -49,10 +49,14 @@ class WebUIScreenLocker : public WebUILoginView, ...@@ -49,10 +49,14 @@ class WebUIScreenLocker : public WebUILoginView,
public LoginDisplay::Delegate, public LoginDisplay::Delegate,
public ScreenLockerDelegate, public ScreenLockerDelegate,
public LockWindow::Observer, public LockWindow::Observer,
#if !defined(USE_ATHENA)
public ash::LockStateObserver, public ash::LockStateObserver,
#endif
public views::WidgetObserver, public views::WidgetObserver,
public PowerManagerClient::Observer, public PowerManagerClient::Observer,
#if !defined(USE_ATHENA)
public ash::VirtualKeyboardStateObserver, public ash::VirtualKeyboardStateObserver,
#endif
public keyboard::KeyboardControllerObserver { public keyboard::KeyboardControllerObserver {
public: public:
explicit WebUIScreenLocker(ScreenLocker* screen_locker); explicit WebUIScreenLocker(ScreenLocker* screen_locker);
...@@ -99,9 +103,11 @@ class WebUIScreenLocker : public WebUILoginView, ...@@ -99,9 +103,11 @@ class WebUIScreenLocker : public WebUILoginView,
// LockWindow::Observer implementation. // LockWindow::Observer implementation.
virtual void OnLockWindowReady() override; virtual void OnLockWindowReady() override;
#if !defined(USE_ATHENA)
// LockStateObserver override. // LockStateObserver override.
virtual void OnLockStateEvent( virtual void OnLockStateEvent(
ash::LockStateObserver::EventType event) override; ash::LockStateObserver::EventType event) override;
#endif
// WidgetObserver override. // WidgetObserver override.
virtual void OnWidgetDestroying(views::Widget* widget) override; virtual void OnWidgetDestroying(views::Widget* widget) override;
...@@ -114,8 +120,10 @@ class WebUIScreenLocker : public WebUILoginView, ...@@ -114,8 +120,10 @@ class WebUIScreenLocker : public WebUILoginView,
// Overridden from content::WebContentsObserver: // Overridden from content::WebContentsObserver:
virtual void RenderProcessGone(base::TerminationStatus status) override; virtual void RenderProcessGone(base::TerminationStatus status) override;
#if !defined(USE_ATHENA)
// Overridden from ash::KeyboardStateObserver: // Overridden from ash::KeyboardStateObserver:
virtual void OnVirtualKeyboardStateChanged(bool activated) override; virtual void OnVirtualKeyboardStateChanged(bool activated) override;
#endif
// Overridden from keyboard::KeyboardControllerObserver: // Overridden from keyboard::KeyboardControllerObserver:
virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h" #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/shell.h"
#include "base/rand_util.h" #include "base/rand_util.h"
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/chromeos/camera_detector.h" #include "chrome/browser/chromeos/camera_detector.h"
...@@ -39,6 +37,11 @@ ...@@ -39,6 +37,11 @@
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
#if !defined(USE_ATHENA)
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/shell.h"
#endif
namespace chromeos { namespace chromeos {
namespace { namespace {
...@@ -359,8 +362,10 @@ void SupervisedUserCreationScreen::OnManagerFullyAuthenticated( ...@@ -359,8 +362,10 @@ void SupervisedUserCreationScreen::OnManagerFullyAuthenticated(
DCHECK(controller_.get()); DCHECK(controller_.get());
// For manager user, move desktop to locked container so that windows created // For manager user, move desktop to locked container so that windows created
// during the user image picker step are below it. // during the user image picker step are below it.
#if !defined(USE_ATHENA)
ash::Shell::GetInstance()-> ash::Shell::GetInstance()->
desktop_background_controller()->MoveDesktopToLockedContainer(); desktop_background_controller()->MoveDesktopToLockedContainer();
#endif
controller_->SetManagerProfile(manager_profile); controller_->SetManagerProfile(manager_profile);
if (actor_) if (actor_)
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
#include <vector> #include <vector>
#include "ash/audio/sounds.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/user_wallpaper_delegate.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/debug/trace_event.h" #include "base/debug/trace_event.h"
...@@ -42,7 +37,6 @@ ...@@ -42,7 +37,6 @@
#include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
#include "chrome/browser/chromeos/login/startup_utils.h" #include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/login/ui/input_events_blocker.h" #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
#include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
#include "chrome/browser/chromeos/login/ui/oobe_display.h" #include "chrome/browser/chromeos/login/ui/oobe_display.h"
#include "chrome/browser/chromeos/login/ui/webui_login_display.h" #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
#include "chrome/browser/chromeos/login/ui/webui_login_view.h" #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
...@@ -96,6 +90,15 @@ ...@@ -96,6 +90,15 @@
#include "ui/wm/core/window_animations.h" #include "ui/wm/core/window_animations.h"
#include "url/gurl.h" #include "url/gurl.h"
#if !defined(USE_ATHENA)
#include "ash/audio/sounds.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/user_wallpaper_delegate.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
#endif
#if defined(USE_ATHENA) #if defined(USE_ATHENA)
#include "athena/screen/public/screen_manager.h" #include "athena/screen/public/screen_manager.h"
#include "athena/util/container_priorities.h" #include "athena/util/container_priorities.h"
...@@ -458,10 +461,12 @@ void LoginDisplayHostImpl::BeforeSessionStart() { ...@@ -458,10 +461,12 @@ void LoginDisplayHostImpl::BeforeSessionStart() {
void LoginDisplayHostImpl::Finalize() { void LoginDisplayHostImpl::Finalize() {
DVLOG(1) << "Session starting"; DVLOG(1) << "Session starting";
#if !defined(USE_ATHENA)
if (ash::Shell::HasInstance()) { if (ash::Shell::HasInstance()) {
ash::Shell::GetInstance()-> ash::Shell::GetInstance()->
desktop_background_controller()->MoveDesktopToUnlockedContainer(); desktop_background_controller()->MoveDesktopToUnlockedContainer();
} }
#endif
if (wizard_controller_.get()) if (wizard_controller_.get())
wizard_controller_->OnSessionStart(); wizard_controller_->OnSessionStart();
...@@ -470,8 +475,10 @@ void LoginDisplayHostImpl::Finalize() { ...@@ -470,8 +475,10 @@ void LoginDisplayHostImpl::Finalize() {
ShutdownDisplayHost(false); ShutdownDisplayHost(false);
break; break;
case ANIMATION_WORKSPACE: case ANIMATION_WORKSPACE:
#if !defined(USE_ATHENA)
if (ash::Shell::HasInstance()) if (ash::Shell::HasInstance())
ScheduleWorkspaceAnimation(); ScheduleWorkspaceAnimation();
#endif
ShutdownDisplayHost(false); ShutdownDisplayHost(false);
break; break;
...@@ -573,6 +580,7 @@ void LoginDisplayHostImpl::StartUserAdding( ...@@ -573,6 +580,7 @@ void LoginDisplayHostImpl::StartUserAdding(
// We should emit this signal only at login screen (after reboot or sign out). // We should emit this signal only at login screen (after reboot or sign out).
login_view_->set_should_emit_login_prompt_visible(false); login_view_->set_should_emit_login_prompt_visible(false);
#if !defined(USE_ATHENA)
// Lock container can be transparent after lock screen animation. // Lock container can be transparent after lock screen animation.
aura::Window* lock_container = ash::Shell::GetContainer( aura::Window* lock_container = ash::Shell::GetContainer(
ash::Shell::GetPrimaryRootWindow(), ash::Shell::GetPrimaryRootWindow(),
...@@ -581,6 +589,7 @@ void LoginDisplayHostImpl::StartUserAdding( ...@@ -581,6 +589,7 @@ void LoginDisplayHostImpl::StartUserAdding(
ash::Shell::GetInstance()-> ash::Shell::GetInstance()->
desktop_background_controller()->MoveDesktopToLockedContainer(); desktop_background_controller()->MoveDesktopToLockedContainer();
#endif
sign_in_controller_.reset(); // Only one controller in a time. sign_in_controller_.reset(); // Only one controller in a time.
sign_in_controller_.reset(new chromeos::ExistingUserController(this)); sign_in_controller_.reset(new chromeos::ExistingUserController(this));
...@@ -848,6 +857,7 @@ void LoginDisplayHostImpl::OnActiveOutputNodeChanged() { ...@@ -848,6 +857,7 @@ void LoginDisplayHostImpl::OnActiveOutputNodeChanged() {
TryToPlayStartupSound(); TryToPlayStartupSound();
} }
#if !defined(USE_ATHENA)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// LoginDisplayHostImpl, ash::KeyboardStateObserver: // LoginDisplayHostImpl, ash::KeyboardStateObserver:
// implementation: // implementation:
...@@ -865,6 +875,7 @@ void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(bool activated) { ...@@ -865,6 +875,7 @@ void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(bool activated) {
} }
} }
} }
#endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
...@@ -902,13 +913,15 @@ void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) { ...@@ -902,13 +913,15 @@ void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) {
void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display, void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display,
uint32_t changed_metrics) { uint32_t changed_metrics) {
if (display.id() != ash::Shell::GetScreen()->GetPrimaryDisplay().id() || gfx::Display primary_display =
gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
if (display.id() != primary_display.id() ||
!(changed_metrics & DISPLAY_METRIC_BOUNDS)) { !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
return; return;
} }
if (GetOobeUI()) { if (GetOobeUI()) {
const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size(); const gfx::Size& size = primary_display.size();
GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(),
size.height()); size.height());
} }
...@@ -942,6 +955,7 @@ void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) { ...@@ -942,6 +955,7 @@ void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) {
} }
void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() { void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() {
#if !defined(USE_ATHENA)
if (ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), if (ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
ash::kShellWindowId_DesktopBackgroundContainer) ash::kShellWindowId_DesktopBackgroundContainer)
->children() ->children()
...@@ -954,6 +968,7 @@ void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() { ...@@ -954,6 +968,7 @@ void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() {
if (!CommandLine::ForCurrentProcess()->HasSwitch( if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableLoginAnimations)) switches::kDisableLoginAnimations))
ash::Shell::GetInstance()->DoInitialWorkspaceAnimation(); ash::Shell::GetInstance()->DoInitialWorkspaceAnimation();
#endif
} }
void LoginDisplayHostImpl::ScheduleFadeOutAnimation() { void LoginDisplayHostImpl::ScheduleFadeOutAnimation() {
...@@ -1053,9 +1068,9 @@ void LoginDisplayHostImpl::InitLoginWindowAndView() { ...@@ -1053,9 +1068,9 @@ void LoginDisplayHostImpl::InitLoginWindowAndView() {
// crbug.com/405859 // crbug.com/405859
focus_ring_controller_.reset(new FocusRingController); focus_ring_controller_.reset(new FocusRingController);
focus_ring_controller_->SetVisible(true); focus_ring_controller_->SetVisible(true);
#endif
keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler); keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler);
#endif
} }
views::Widget::InitParams params( views::Widget::InitParams params(
...@@ -1149,13 +1164,13 @@ void LoginDisplayHostImpl::TryToPlayStartupSound() { ...@@ -1149,13 +1164,13 @@ void LoginDisplayHostImpl::TryToPlayStartupSound() {
return; return;
} }
#if !defined(USE_ATHENA)
if (!startup_sound_honors_spoken_feedback_ && if (!startup_sound_honors_spoken_feedback_ &&
!ash::PlaySystemSoundAlways(SOUND_STARTUP)) { !ash::PlaySystemSoundAlways(SOUND_STARTUP)) {
EnableSystemSoundsForAccessibility(); EnableSystemSoundsForAccessibility();
return; return;
} }
#if !defined(USE_ATHENA)
// crbug.com/408733 // crbug.com/408733
if (startup_sound_honors_spoken_feedback_ && if (startup_sound_honors_spoken_feedback_ &&
!ash::PlaySystemSoundIfSpokenFeedback(SOUND_STARTUP)) { !ash::PlaySystemSoundIfSpokenFeedback(SOUND_STARTUP)) {
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "ash/shell_delegate.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
...@@ -29,6 +28,10 @@ ...@@ -29,6 +28,10 @@
#include "ui/keyboard/keyboard_controller_observer.h" #include "ui/keyboard/keyboard_controller_observer.h"
#include "ui/views/widget/widget_removals_observer.h" #include "ui/views/widget/widget_removals_observer.h"
#if !defined(USE_ATHENA)
#include "ash/shell_delegate.h"
#endif
class PrefService; class PrefService;
namespace content { namespace content {
...@@ -40,11 +43,14 @@ namespace chromeos { ...@@ -40,11 +43,14 @@ namespace chromeos {
class DemoAppLauncher; class DemoAppLauncher;
class FocusRingController; class FocusRingController;
class KeyboardDrivenOobeKeyHandler;
class OobeUI; class OobeUI;
class WebUILoginDisplay; class WebUILoginDisplay;
class WebUILoginView; class WebUILoginView;
#if !defined(USE_ATHENA)
class KeyboardDrivenOobeKeyHandler;
#endif
// An implementation class for OOBE/login WebUI screen host. // An implementation class for OOBE/login WebUI screen host.
// It encapsulates controllers, background integration and flow. // It encapsulates controllers, background integration and flow.
class LoginDisplayHostImpl : public LoginDisplayHost, class LoginDisplayHostImpl : public LoginDisplayHost,
...@@ -52,7 +58,9 @@ class LoginDisplayHostImpl : public LoginDisplayHost, ...@@ -52,7 +58,9 @@ class LoginDisplayHostImpl : public LoginDisplayHost,
public content::WebContentsObserver, public content::WebContentsObserver,
public chromeos::SessionManagerClient::Observer, public chromeos::SessionManagerClient::Observer,
public chromeos::CrasAudioHandler::AudioObserver, public chromeos::CrasAudioHandler::AudioObserver,
#if !defined(USE_ATHENA)
public ash::VirtualKeyboardStateObserver, public ash::VirtualKeyboardStateObserver,
#endif
public keyboard::KeyboardControllerObserver, public keyboard::KeyboardControllerObserver,
public gfx::DisplayObserver, public gfx::DisplayObserver,
public views::WidgetRemovalsObserver { public views::WidgetRemovalsObserver {
...@@ -123,8 +131,10 @@ class LoginDisplayHostImpl : public LoginDisplayHost, ...@@ -123,8 +131,10 @@ class LoginDisplayHostImpl : public LoginDisplayHost,
// Overridden from chromeos::CrasAudioHandler::AudioObserver: // Overridden from chromeos::CrasAudioHandler::AudioObserver:
virtual void OnActiveOutputNodeChanged() override; virtual void OnActiveOutputNodeChanged() override;
#if !defined(USE_ATHENA)
// Overridden from ash::KeyboardStateObserver: // Overridden from ash::KeyboardStateObserver:
virtual void OnVirtualKeyboardStateChanged(bool activated) override; virtual void OnVirtualKeyboardStateChanged(bool activated) override;
#endif
// Overridden from keyboard::KeyboardControllerObserver: // Overridden from keyboard::KeyboardControllerObserver:
virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
...@@ -293,8 +303,10 @@ class LoginDisplayHostImpl : public LoginDisplayHost, ...@@ -293,8 +303,10 @@ class LoginDisplayHostImpl : public LoginDisplayHost,
// driven oobe. // driven oobe.
scoped_ptr<FocusRingController> focus_ring_controller_; scoped_ptr<FocusRingController> focus_ring_controller_;
#if !defined(USE_ATHENA)
// Handles special keys for keyboard driven oobe. // Handles special keys for keyboard driven oobe.
scoped_ptr<KeyboardDrivenOobeKeyHandler> keyboard_driven_oobe_key_handler_; scoped_ptr<KeyboardDrivenOobeKeyHandler> keyboard_driven_oobe_key_handler_;
#endif
FinalizeAnimationType finalize_animation_type_; FinalizeAnimationType finalize_animation_type_;
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include "chrome/browser/chromeos/login/ui/user_adding_screen.h" #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "base/observer_list.h" #include "base/observer_list.h"
...@@ -19,6 +17,8 @@ ...@@ -19,6 +17,8 @@
#include "ui/gfx/size.h" #include "ui/gfx/size.h"
#if !defined(USE_ATHENA) #if !defined(USE_ATHENA)
#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
#endif #endif
...@@ -66,8 +66,10 @@ void UserAddingScreenImpl::Start() { ...@@ -66,8 +66,10 @@ void UserAddingScreenImpl::Start() {
void UserAddingScreenImpl::Cancel() { void UserAddingScreenImpl::Cancel() {
CHECK(IsRunning()); CHECK(IsRunning());
#if !defined(USE_ATHENA)
// Make sure that system tray is enabled after this flow. // Make sure that system tray is enabled after this flow.
ash::Shell::GetInstance()->GetPrimarySystemTray()->SetEnabled(true); ash::Shell::GetInstance()->GetPrimarySystemTray()->SetEnabled(true);
#endif
display_host_->Finalize(); display_host_->Finalize();
#if !defined(USE_ATHENA) #if !defined(USE_ATHENA)
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <cstddef> #include <cstddef>
#include <set> #include <set>
#include "ash/multi_profile_uma.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/command_line.h" #include "base/command_line.h"
...@@ -60,6 +59,7 @@ ...@@ -60,6 +59,7 @@
#include "ui/wm/core/wm_core_switches.h" #include "ui/wm/core/wm_core_switches.h"
#if !defined(USE_ATHENA) #if !defined(USE_ATHENA)
#include "ash/multi_profile_uma.h"
#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
#endif #endif
...@@ -1062,12 +1062,14 @@ void ChromeUserManagerImpl::OnUserNotAllowed(const std::string& user_email) { ...@@ -1062,12 +1062,14 @@ void ChromeUserManagerImpl::OnUserNotAllowed(const std::string& user_email) {
} }
void ChromeUserManagerImpl::UpdateNumberOfUsers() { void ChromeUserManagerImpl::UpdateNumberOfUsers() {
#if !defined(USE_ATHENA)
size_t users = GetLoggedInUsers().size(); size_t users = GetLoggedInUsers().size();
if (users) { if (users) {
// Write the user number as UMA stat when a multi user session is possible. // Write the user number as UMA stat when a multi user session is possible.
if ((users + GetUsersAllowedForMultiProfile().size()) > 1) if ((users + GetUsersAllowedForMultiProfile().size()) > 1)
ash::MultiProfileUMA::RecordUserCount(users); ash::MultiProfileUMA::RecordUserCount(users);
} }
#endif
base::debug::SetCrashKeyValue( base::debug::SetCrashKeyValue(
crash_keys::kNumberOfUsers, crash_keys::kNumberOfUsers,
......
...@@ -586,8 +586,6 @@ ...@@ -586,8 +586,6 @@
'browser/chromeos/login/ui/captive_portal_window_proxy.h', 'browser/chromeos/login/ui/captive_portal_window_proxy.h',
'browser/chromeos/login/ui/input_events_blocker.cc', 'browser/chromeos/login/ui/input_events_blocker.cc',
'browser/chromeos/login/ui/input_events_blocker.h', 'browser/chromeos/login/ui/input_events_blocker.h',
'browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.cc',
'browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h',
'browser/chromeos/login/ui/lock_window.cc', 'browser/chromeos/login/ui/lock_window.cc',
'browser/chromeos/login/ui/lock_window.h', 'browser/chromeos/login/ui/lock_window.h',
'browser/chromeos/login/ui/lock_window_aura.cc', 'browser/chromeos/login/ui/lock_window_aura.cc',
...@@ -948,6 +946,8 @@ ...@@ -948,6 +946,8 @@
'browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h', 'browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h',
'browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc', 'browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc',
'browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h', 'browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h',
'browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.cc',
'browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h',
'browser/chromeos/login/users/wallpaper/wallpaper_manager.cc', 'browser/chromeos/login/users/wallpaper/wallpaper_manager.cc',
'browser/chromeos/login/users/wallpaper/wallpaper_manager.h', 'browser/chromeos/login/users/wallpaper/wallpaper_manager.h',
'browser/chromeos/ui/kiosk_external_update_notification.cc', 'browser/chromeos/ui/kiosk_external_update_notification.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment