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

Side by Side Diff: trunk/src/ash/display/display_manager.cc

Issue 271973002: Revert 268933 "Helpful message for not checking SupportsMultiple..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 iter != displays_.end(); ++iter) { 625 iter != displays_.end(); ++iter) {
626 display_info_list.push_back(GetDisplayInfo(iter->id())); 626 display_info_list.push_back(GetDisplayInfo(iter->id()));
627 } 627 }
628 AddMirrorDisplayInfoIfAny(&display_info_list); 628 AddMirrorDisplayInfoIfAny(&display_info_list);
629 UpdateDisplays(display_info_list); 629 UpdateDisplays(display_info_list);
630 } 630 }
631 631
632 void DisplayManager::UpdateDisplays( 632 void DisplayManager::UpdateDisplays(
633 const std::vector<DisplayInfo>& updated_display_info_list) { 633 const std::vector<DisplayInfo>& updated_display_info_list) {
634 #if defined(OS_WIN) 634 #if defined(OS_WIN)
635 DCHECK_EQ(1u, updated_display_info_list.size()) << 635 if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
636 ": Multiple display test does not work on Windows bots. Please " 636 DCHECK_EQ(1u, updated_display_info_list.size()) <<
637 "skip (don't disable) the test using SupportsMultipleDisplays()"; 637 "Multiple display test does not work on Win8 bots. Please "
638 "skip (don't disable) the test using SupportsMultipleDisplays()";
639 }
638 #endif 640 #endif
639 641
640 DisplayInfoList new_display_info_list = updated_display_info_list; 642 DisplayInfoList new_display_info_list = updated_display_info_list;
641 std::sort(displays_.begin(), displays_.end(), DisplaySortFunctor()); 643 std::sort(displays_.begin(), displays_.end(), DisplaySortFunctor());
642 std::sort(new_display_info_list.begin(), 644 std::sort(new_display_info_list.begin(),
643 new_display_info_list.end(), 645 new_display_info_list.end(),
644 DisplayInfoSortFunctor()); 646 DisplayInfoSortFunctor());
645 DisplayList removed_displays; 647 DisplayList removed_displays;
646 std::vector<size_t> changed_display_indices; 648 std::vector<size_t> changed_display_indices;
647 std::vector<size_t> added_display_indices; 649 std::vector<size_t> added_display_indices;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 new_secondary_origin.Offset(-secondary_bounds.width(), offset); 1117 new_secondary_origin.Offset(-secondary_bounds.width(), offset);
1116 break; 1118 break;
1117 } 1119 }
1118 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); 1120 gfx::Insets insets = secondary_display->GetWorkAreaInsets();
1119 secondary_display->set_bounds( 1121 secondary_display->set_bounds(
1120 gfx::Rect(new_secondary_origin, secondary_bounds.size())); 1122 gfx::Rect(new_secondary_origin, secondary_bounds.size()));
1121 secondary_display->UpdateWorkAreaFromInsets(insets); 1123 secondary_display->UpdateWorkAreaFromInsets(insets);
1122 } 1124 }
1123 1125
1124 } // namespace ash 1126 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698