| OLD | NEW |
| 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 "ash/display/projecting_observer_chromeos.h" | 5 #include "ash/display/projecting_observer_chromeos.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chromeos/dbus/power_manager_client.h" | 8 #include "chromeos/dbus/power_manager_client.h" |
| 9 #include "ui/display/types/display_snapshot.h" | 9 #include "ui/display/types/display_snapshot.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 if (casting_session_count_ < 0) | 45 if (casting_session_count_ < 0) |
| 46 casting_session_count_ = 0; | 46 casting_session_count_ = 0; |
| 47 } | 47 } |
| 48 | 48 |
| 49 SetIsProjecting(); | 49 SetIsProjecting(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ProjectingObserver::SetIsProjecting() { | 52 void ProjectingObserver::SetIsProjecting() { |
| 53 // "Projecting" is defined as having more than 1 output connected while at | 53 // "Projecting" is defined as having more than 1 output connected while at |
| 54 // least one of them is an internal output. | 54 // least one of them is an internal output. |
| 55 bool projecting = has_internal_output_ && | 55 bool projecting = |
| 56 (output_count_ + casting_session_count_ > 1); | 56 has_internal_output_ && (output_count_ + casting_session_count_ > 1); |
| 57 | 57 |
| 58 power_manager_client_->SetIsProjecting(projecting); | 58 power_manager_client_->SetIsProjecting(projecting); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace ash | 61 } // namespace ash |
| OLD | NEW |