OLD | NEW |
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/ui/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 372 } |
373 | 373 |
374 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this); | 374 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this); |
375 CrasAudioHandler::Get()->AddAudioObserver(this); | 375 CrasAudioHandler::Get()->AddAudioObserver(this); |
376 if (keyboard::KeyboardController::GetInstance()) { | 376 if (keyboard::KeyboardController::GetInstance()) { |
377 keyboard::KeyboardController::GetInstance()->AddObserver(this); | 377 keyboard::KeyboardController::GetInstance()->AddObserver(this); |
378 is_observing_keyboard_ = true; | 378 is_observing_keyboard_ = true; |
379 } | 379 } |
380 | 380 |
381 if (!ash_util::IsRunningInMash()) | 381 if (!ash_util::IsRunningInMash()) |
382 ash::WmShell::Get()->AddShellObserver(this); | 382 ash::Shell::GetInstance()->AddShellObserver(this); |
383 else | 383 else |
384 NOTIMPLEMENTED(); | 384 NOTIMPLEMENTED(); |
385 display::Screen::GetScreen()->AddObserver(this); | 385 display::Screen::GetScreen()->AddObserver(this); |
386 | 386 |
387 // We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING | 387 // We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING |
388 // because/ APP_TERMINATING will never be fired as long as this keeps | 388 // because/ APP_TERMINATING will never be fired as long as this keeps |
389 // ref-count. CLOSE_ALL_BROWSERS_REQUEST is safe here because there will be no | 389 // ref-count. CLOSE_ALL_BROWSERS_REQUEST is safe here because there will be no |
390 // browser instance that will block the shutdown. | 390 // browser instance that will block the shutdown. |
391 registrar_.Add(this, | 391 registrar_.Add(this, |
392 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, | 392 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 491 |
492 LoginDisplayHostImpl::~LoginDisplayHostImpl() { | 492 LoginDisplayHostImpl::~LoginDisplayHostImpl() { |
493 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); | 493 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); |
494 CrasAudioHandler::Get()->RemoveAudioObserver(this); | 494 CrasAudioHandler::Get()->RemoveAudioObserver(this); |
495 if (keyboard::KeyboardController::GetInstance() && is_observing_keyboard_) { | 495 if (keyboard::KeyboardController::GetInstance() && is_observing_keyboard_) { |
496 keyboard::KeyboardController::GetInstance()->RemoveObserver(this); | 496 keyboard::KeyboardController::GetInstance()->RemoveObserver(this); |
497 is_observing_keyboard_ = false; | 497 is_observing_keyboard_ = false; |
498 } | 498 } |
499 | 499 |
500 if (!ash_util::IsRunningInMash()) | 500 if (!ash_util::IsRunningInMash()) |
501 ash::WmShell::Get()->RemoveShellObserver(this); | 501 ash::Shell::GetInstance()->RemoveShellObserver(this); |
502 else | 502 else |
503 NOTIMPLEMENTED(); | 503 NOTIMPLEMENTED(); |
504 display::Screen::GetScreen()->RemoveObserver(this); | 504 display::Screen::GetScreen()->RemoveObserver(this); |
505 | 505 |
506 if (login_view_ && login_window_) | 506 if (login_view_ && login_window_) |
507 login_window_->RemoveRemovalsObserver(this); | 507 login_window_->RemoveRemovalsObserver(this); |
508 | 508 |
509 if (login_window_delegate_) | 509 if (login_window_delegate_) |
510 login_window_delegate_->LoginDisplayHostDestroyed(); | 510 login_window_delegate_->LoginDisplayHostDestroyed(); |
511 | 511 |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1482 // Chrome locale. Otherwise it will be lost if Chrome restarts. | 1482 // Chrome locale. Otherwise it will be lost if Chrome restarts. |
1483 // Don't need to schedule pref save because setting initial local | 1483 // Don't need to schedule pref save because setting initial local |
1484 // will enforce preference saving. | 1484 // will enforce preference saving. |
1485 prefs->SetString(prefs::kApplicationLocale, locale); | 1485 prefs->SetString(prefs::kApplicationLocale, locale); |
1486 StartupUtils::SetInitialLocale(locale); | 1486 StartupUtils::SetInitialLocale(locale); |
1487 | 1487 |
1488 TriggerShowLoginWizardFinish(locale, std::move(data)); | 1488 TriggerShowLoginWizardFinish(locale, std::move(data)); |
1489 } | 1489 } |
1490 | 1490 |
1491 } // namespace chromeos | 1491 } // namespace chromeos |
OLD | NEW |