| 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/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 // LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver: | 968 // LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver: |
| 969 | 969 |
| 970 void LoginDisplayHostImpl::OnActiveOutputNodeChanged() { | 970 void LoginDisplayHostImpl::OnActiveOutputNodeChanged() { |
| 971 TryToPlayStartupSound(); | 971 TryToPlayStartupSound(); |
| 972 } | 972 } |
| 973 | 973 |
| 974 //////////////////////////////////////////////////////////////////////////////// | 974 //////////////////////////////////////////////////////////////////////////////// |
| 975 // LoginDisplayHostImpl, display::DisplayObserver: | 975 // LoginDisplayHostImpl, display::DisplayObserver: |
| 976 | 976 |
| 977 void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) { | 977 void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) { |
| 978 if (GetOobeUI()) |
| 979 GetOobeUI()->OnDisplayConfigurationChanged(); |
| 978 } | 980 } |
| 979 | 981 |
| 980 void LoginDisplayHostImpl::OnDisplayRemoved( | 982 void LoginDisplayHostImpl::OnDisplayRemoved( |
| 981 const display::Display& old_display) {} | 983 const display::Display& old_display) { |
| 984 if (GetOobeUI()) |
| 985 GetOobeUI()->OnDisplayConfigurationChanged(); |
| 986 } |
| 982 | 987 |
| 983 void LoginDisplayHostImpl::OnDisplayMetricsChanged( | 988 void LoginDisplayHostImpl::OnDisplayMetricsChanged( |
| 984 const display::Display& display, | 989 const display::Display& display, |
| 985 uint32_t changed_metrics) { | 990 uint32_t changed_metrics) { |
| 986 display::Display primary_display = | 991 display::Display primary_display = |
| 987 display::Screen::GetScreen()->GetPrimaryDisplay(); | 992 display::Screen::GetScreen()->GetPrimaryDisplay(); |
| 988 if (display.id() != primary_display.id() || | 993 if (display.id() != primary_display.id() || |
| 989 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { | 994 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { |
| 990 return; | 995 return; |
| 991 } | 996 } |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1389 // Chrome locale. Otherwise it will be lost if Chrome restarts. | 1394 // Chrome locale. Otherwise it will be lost if Chrome restarts. |
| 1390 // Don't need to schedule pref save because setting initial local | 1395 // Don't need to schedule pref save because setting initial local |
| 1391 // will enforce preference saving. | 1396 // will enforce preference saving. |
| 1392 prefs->SetString(prefs::kApplicationLocale, locale); | 1397 prefs->SetString(prefs::kApplicationLocale, locale); |
| 1393 StartupUtils::SetInitialLocale(locale); | 1398 StartupUtils::SetInitialLocale(locale); |
| 1394 | 1399 |
| 1395 TriggerShowLoginWizardFinish(locale, std::move(data)); | 1400 TriggerShowLoginWizardFinish(locale, std::move(data)); |
| 1396 } | 1401 } |
| 1397 | 1402 |
| 1398 } // namespace chromeos | 1403 } // namespace chromeos |
| OLD | NEW |