| 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 "chrome/browser/media/router/media_route.h" | 5 #include "chrome/browser/media/router/media_route.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/media/router/media_source.h" | 8 #include "chrome/browser/media/router/media_source.h" |
| 9 | 9 |
| 10 namespace media_router { | 10 namespace media_router { |
| 11 | 11 |
| 12 MediaRoute::MediaRoute(const MediaRouteId& media_route_id, | 12 MediaRoute::MediaRoute(const MediaRouteId& media_route_id, |
| 13 const MediaSource& media_source, | 13 const MediaSource& media_source, |
| 14 const MediaSink& media_sink, | 14 const MediaSink& media_sink, |
| 15 const std::string& description, | 15 const std::string& description, |
| 16 bool is_local) | 16 bool is_local) |
| 17 : media_route_id_(media_route_id), | 17 : media_route_id_(media_route_id), |
| 18 media_source_(media_source), | 18 media_source_(media_source), |
| 19 media_sink_(media_sink), | 19 media_sink_(media_sink), |
| 20 description_(description), | 20 description_(description), |
| 21 is_local_(is_local), | 21 is_local_(is_local), |
| 22 state_(MEDIA_ROUTE_STATE_NEW) { | 22 state_(MEDIA_ROUTE_STATE_NEW) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 MediaRoute::MediaRoute() |
| 26 : MediaRoute("", MediaSource(), MediaSink(), "", false) { |
| 27 } |
| 28 |
| 25 MediaRoute::~MediaRoute() { | 29 MediaRoute::~MediaRoute() { |
| 26 } | 30 } |
| 27 | 31 |
| 32 bool MediaRoute::Empty() const { |
| 33 return media_route_id_.empty(); |
| 34 } |
| 35 |
| 28 bool MediaRoute::Equals(const MediaRoute& other) const { | 36 bool MediaRoute::Equals(const MediaRoute& other) const { |
| 29 return media_route_id_ == other.media_route_id_; | 37 return media_route_id_ == other.media_route_id_; |
| 30 } | 38 } |
| 31 | 39 |
| 32 } // namespace media_router | 40 } // namespace media_router |
| OLD | NEW |