| 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/audio/sounds.h" | 10 #include "ash/audio/sounds.h" |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 // LoginDisplayHostImpl, gfx::DisplayObserver implementation: | 871 // LoginDisplayHostImpl, gfx::DisplayObserver implementation: |
| 872 | 872 |
| 873 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) { | 873 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) { |
| 874 } | 874 } |
| 875 | 875 |
| 876 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) { | 876 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) { |
| 877 } | 877 } |
| 878 | 878 |
| 879 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display, | 879 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display, |
| 880 uint32_t changed_metrics) { | 880 uint32_t changed_metrics) { |
| 881 gfx::Display primary_display = | 881 gfx::Display primary_display = gfx::Screen::GetScreen()->GetPrimaryDisplay(); |
| 882 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); | |
| 883 if (display.id() != primary_display.id() || | 882 if (display.id() != primary_display.id() || |
| 884 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { | 883 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { |
| 885 return; | 884 return; |
| 886 } | 885 } |
| 887 | 886 |
| 888 if (GetOobeUI()) { | 887 if (GetOobeUI()) { |
| 889 const gfx::Size& size = primary_display.size(); | 888 const gfx::Size& size = primary_display.size(); |
| 890 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), | 889 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), |
| 891 size.height()); | 890 size.height()); |
| 892 } | 891 } |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 | 1263 |
| 1265 locale_util::SwitchLanguageCallback callback( | 1264 locale_util::SwitchLanguageCallback callback( |
| 1266 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data)))); | 1265 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data)))); |
| 1267 | 1266 |
| 1268 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1267 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1269 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, | 1268 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, |
| 1270 callback, ProfileManager::GetActiveUserProfile()); | 1269 callback, ProfileManager::GetActiveUserProfile()); |
| 1271 } | 1270 } |
| 1272 | 1271 |
| 1273 } // namespace chromeos | 1272 } // namespace chromeos |
| OLD | NEW |