| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1426 } | 1426 } |
| 1427 | 1427 |
| 1428 void DisplayManager::AddObserver(display::DisplayObserver* observer) { | 1428 void DisplayManager::AddObserver(display::DisplayObserver* observer) { |
| 1429 observers_.AddObserver(observer); | 1429 observers_.AddObserver(observer); |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 void DisplayManager::RemoveObserver(display::DisplayObserver* observer) { | 1432 void DisplayManager::RemoveObserver(display::DisplayObserver* observer) { |
| 1433 observers_.RemoveObserver(observer); | 1433 observers_.RemoveObserver(observer); |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 const display::Display& DisplayManager::GetSecondaryDisplay() const { |
| 1437 CHECK_LE(2U, GetNumDisplays()); |
| 1438 return GetDisplayAt(0).id() == |
| 1439 display::Screen::GetScreen()->GetPrimaryDisplay().id() |
| 1440 ? GetDisplayAt(1) |
| 1441 : GetDisplayAt(0); |
| 1442 } |
| 1443 |
| 1436 } // namespace ash | 1444 } // namespace ash |
| OLD | NEW |