summaryrefslogtreecommitdiffstats
path: root/chrome/browser/media/router/media_source.cc
blob: 87b4d78788759bd58db0d1b8e166dc5903e0011a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/media/router/media_source.h"

#include <string>

namespace media_router {

MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) {
}

MediaSource::MediaSource() {
}

MediaSource::~MediaSource() {}

MediaSource::Id MediaSource::id() const {
  return id_;
}

bool MediaSource::Equals(const MediaSource& other) const {
  return id_ == other.id();
}

bool MediaSource::Empty() const {
  return id_.empty();
}

std::string MediaSource::ToString() const {
  return "MediaSource[" + id_ + "]";
}

}  // namespace media_router