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

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: fixes Created 4 years, 11 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 unified diff | Download patch
OLDNEW
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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // LoginDisplayHostImpl, gfx::DisplayObserver implementation: 874 // LoginDisplayHostImpl, gfx::DisplayObserver implementation:
875 875
876 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) { 876 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) {
877 } 877 }
878 878
879 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) { 879 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) {
880 } 880 }
881 881
882 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display, 882 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display,
883 uint32_t changed_metrics) { 883 uint32_t changed_metrics) {
884 gfx::Display primary_display = 884 gfx::Display primary_display = gfx::Screen::GetScreen()->GetPrimaryDisplay();
885 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
886 if (display.id() != primary_display.id() || 885 if (display.id() != primary_display.id() ||
887 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { 886 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
888 return; 887 return;
889 } 888 }
890 889
891 if (GetOobeUI()) { 890 if (GetOobeUI()) {
892 const gfx::Size& size = primary_display.size(); 891 const gfx::Size& size = primary_display.size();
893 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 892 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(),
894 size.height()); 893 size.height());
895 } 894 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 1266
1268 locale_util::SwitchLanguageCallback callback( 1267 locale_util::SwitchLanguageCallback callback(
1269 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data)))); 1268 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data))));
1270 1269
1271 // Load locale keyboards here. Hardware layout would be automatically enabled. 1270 // Load locale keyboards here. Hardware layout would be automatically enabled.
1272 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, 1271 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */,
1273 callback, ProfileManager::GetActiveUserProfile()); 1272 callback, ProfileManager::GetActiveUserProfile());
1274 } 1273 }
1275 1274
1276 } // namespace chromeos 1275 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698