| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/arc/arc_bridge_service.h" | 5 #include "components/arc/arc_bridge_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 | 464 |
| 465 video_ptr_.reset(); | 465 video_ptr_.reset(); |
| 466 FOR_EACH_OBSERVER(Observer, observer_list(), OnVideoInstanceClosed()); | 466 FOR_EACH_OBSERVER(Observer, observer_list(), OnVideoInstanceClosed()); |
| 467 } | 467 } |
| 468 | 468 |
| 469 void ArcBridgeService::SetState(State state) { | 469 void ArcBridgeService::SetState(State state) { |
| 470 DCHECK(CalledOnValidThread()); | 470 DCHECK(CalledOnValidThread()); |
| 471 // DCHECK on enum classes not supported. | 471 // DCHECK on enum classes not supported. |
| 472 DCHECK(state_ != state); | 472 DCHECK(state_ != state); |
| 473 state_ = state; | 473 state_ = state; |
| 474 VLOG(2) << "State: " << static_cast<uint32_t>(state_); |
| 474 FOR_EACH_OBSERVER(Observer, observer_list(), OnStateChanged(state_)); | 475 FOR_EACH_OBSERVER(Observer, observer_list(), OnStateChanged(state_)); |
| 475 } | 476 } |
| 476 | 477 |
| 477 void ArcBridgeService::SetAvailable(bool available) { | 478 void ArcBridgeService::SetAvailable(bool available) { |
| 478 DCHECK(CalledOnValidThread()); | 479 DCHECK(CalledOnValidThread()); |
| 479 DCHECK(available_ != available); | 480 DCHECK(available_ != available); |
| 480 available_ = available; | 481 available_ = available; |
| 481 FOR_EACH_OBSERVER(Observer, observer_list(), OnAvailableChanged(available_)); | 482 FOR_EACH_OBSERVER(Observer, observer_list(), OnAvailableChanged(available_)); |
| 482 } | 483 } |
| 483 | 484 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 499 CloseMetricsChannel(); | 500 CloseMetricsChannel(); |
| 500 CloseNetChannel(); | 501 CloseNetChannel(); |
| 501 CloseNotificationsChannel(); | 502 CloseNotificationsChannel(); |
| 502 ClosePolicyChannel(); | 503 ClosePolicyChannel(); |
| 503 ClosePowerChannel(); | 504 ClosePowerChannel(); |
| 504 CloseProcessChannel(); | 505 CloseProcessChannel(); |
| 505 CloseVideoChannel(); | 506 CloseVideoChannel(); |
| 506 } | 507 } |
| 507 | 508 |
| 508 } // namespace arc | 509 } // namespace arc |
| OLD | NEW |