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

Side by Side Diff: ui/display/manager/display_manager.cc

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc ('k') | 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 "ui/display/manager/display_manager.h" 5 #include "ui/display/manager/display_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 display_info_list.push_back(GetDisplayInfo(display.id())); 629 display_info_list.push_back(GetDisplayInfo(display.id()));
630 AddMirrorDisplayInfoIfAny(&display_info_list); 630 AddMirrorDisplayInfoIfAny(&display_info_list);
631 UpdateDisplaysWith(display_info_list); 631 UpdateDisplaysWith(display_info_list);
632 } 632 }
633 633
634 void DisplayManager::UpdateDisplaysWith( 634 void DisplayManager::UpdateDisplaysWith(
635 const DisplayInfoList& updated_display_info_list) { 635 const DisplayInfoList& updated_display_info_list) {
636 #if defined(OS_WIN) 636 #if defined(OS_WIN)
637 DCHECK_EQ(1u, updated_display_info_list.size()) 637 DCHECK_EQ(1u, updated_display_info_list.size())
638 << ": Multiple display test does not work on Windows bots. Please " 638 << ": Multiple display test does not work on Windows bots. Please "
639 "skip (don't disable) the test using SupportsMultipleDisplays()"; 639 "skip (don't disable) the test.";
640 #endif 640 #endif
641 641
642 DisplayInfoList new_display_info_list = updated_display_info_list; 642 DisplayInfoList new_display_info_list = updated_display_info_list;
643 std::sort(active_display_list_.begin(), active_display_list_.end(), 643 std::sort(active_display_list_.begin(), active_display_list_.end(),
644 DisplaySortFunctor()); 644 DisplaySortFunctor());
645 std::sort(new_display_info_list.begin(), new_display_info_list.end(), 645 std::sort(new_display_info_list.begin(), new_display_info_list.end(),
646 DisplayInfoSortFunctor()); 646 DisplayInfoSortFunctor());
647 647
648 if (new_display_info_list.size() > 1) { 648 if (new_display_info_list.size() > 1) {
649 DisplayIdList list = GenerateDisplayIdList( 649 DisplayIdList list = GenerateDisplayIdList(
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 } 1437 }
1438 1438
1439 const Display& DisplayManager::GetSecondaryDisplay() const { 1439 const Display& DisplayManager::GetSecondaryDisplay() const {
1440 CHECK_LE(2U, GetNumDisplays()); 1440 CHECK_LE(2U, GetNumDisplays());
1441 return GetDisplayAt(0).id() == Screen::GetScreen()->GetPrimaryDisplay().id() 1441 return GetDisplayAt(0).id() == Screen::GetScreen()->GetPrimaryDisplay().id()
1442 ? GetDisplayAt(1) 1442 ? GetDisplayAt(1)
1443 : GetDisplayAt(0); 1443 : GetDisplayAt(0);
1444 } 1444 }
1445 1445
1446 } // namespace display 1446 } // namespace display
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698