[Media Router] Add iconType field to MediaSink.
[chromium-blink-merge.git] / chromecast / common / media / shared_memory_chunk.cc
blob405339502c5a94f77bb070dea5134523bf0ce10d
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
3 // found in the LICENSE file.
5 #include "chromecast/common/media/shared_memory_chunk.h"
7 #include "base/memory/shared_memory.h"
9 namespace chromecast {
10 namespace media {
12 SharedMemoryChunk::SharedMemoryChunk(
13 scoped_ptr<base::SharedMemory> shared_mem,
14 size_t size)
15 : shared_mem_(shared_mem.Pass()),
16 size_(size) {
19 SharedMemoryChunk::~SharedMemoryChunk() {
22 void* SharedMemoryChunk::data() const {
23 return shared_mem_->memory();
26 size_t SharedMemoryChunk::size() const {
27 return size_;
30 bool SharedMemoryChunk::valid() const {
31 return true;
34 } // namespace media
35 } // namespace chromecast