OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/display/display_manager.h" | 5 #include "ash/display/display_manager.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 const std::vector<DisplayMode>& modes = display_info.display_modes(); | 447 const std::vector<DisplayMode>& modes = display_info.display_modes(); |
448 DCHECK_NE(0u, modes.size()); | 448 DCHECK_NE(0u, modes.size()); |
449 std::vector<DisplayMode>::const_iterator iter = | 449 std::vector<DisplayMode>::const_iterator iter = |
450 std::find_if(modes.begin(), modes.end(), DisplayModeMatcher(resolution)); | 450 std::find_if(modes.begin(), modes.end(), DisplayModeMatcher(resolution)); |
451 if (iter == modes.end()) { | 451 if (iter == modes.end()) { |
452 LOG(WARNING) << "Unsupported resolution was requested:" | 452 LOG(WARNING) << "Unsupported resolution was requested:" |
453 << resolution.ToString(); | 453 << resolution.ToString(); |
454 return; | 454 return; |
455 } | 455 } |
456 display_modes_[display_id] = *iter; | 456 display_modes_[display_id] = *iter; |
457 #if defined(OS_CHROMEOS) && defined(USE_X11) | 457 #if defined(OS_CHROMEOS) |
458 if (base::SysInfo::IsRunningOnChromeOS()) | 458 if (base::SysInfo::IsRunningOnChromeOS()) |
459 Shell::GetInstance()->output_configurator()->OnConfigurationChanged(); | 459 Shell::GetInstance()->output_configurator()->OnConfigurationChanged(); |
460 #endif | 460 #endif |
461 } | 461 } |
462 | 462 |
463 void DisplayManager::RegisterDisplayProperty( | 463 void DisplayManager::RegisterDisplayProperty( |
464 int64 display_id, | 464 int64 display_id, |
465 gfx::Display::Rotation rotation, | 465 gfx::Display::Rotation rotation, |
466 float ui_scale, | 466 float ui_scale, |
467 const gfx::Insets* overscan_insets, | 467 const gfx::Insets* overscan_insets, |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 break; | 1110 break; |
1111 } | 1111 } |
1112 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); | 1112 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); |
1113 secondary_display->set_bounds( | 1113 secondary_display->set_bounds( |
1114 gfx::Rect(new_secondary_origin, secondary_bounds.size())); | 1114 gfx::Rect(new_secondary_origin, secondary_bounds.size())); |
1115 secondary_display->UpdateWorkAreaFromInsets(insets); | 1115 secondary_display->UpdateWorkAreaFromInsets(insets); |
1116 } | 1116 } |
1117 | 1117 |
1118 } // namespace internal | 1118 } // namespace internal |
1119 } // namespace ash | 1119 } // namespace ash |
OLD | NEW |