Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: chromecast/common/media/shared_memory_chunk.h

Issue 814403002: [Chromecast] Add CmaMediaRendererFactory and IPC proxy components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromecast/common/media/shared_memory_chunk.h
diff --git a/chromecast/common/media/shared_memory_chunk.h b/chromecast/common/media/shared_memory_chunk.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7fe4bcf39bb369a8352d0e021b9e5e0fe3cac50
--- /dev/null
+++ b/chromecast/common/media/shared_memory_chunk.h
@@ -0,0 +1,40 @@
+// Copyright 2014 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.
+
+#ifndef CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_
+#define CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "chromecast/media/cma/ipc/media_memory_chunk.h"
+
+namespace base {
+class SharedMemory;
+}
+
+namespace chromecast {
+namespace media {
+
+class SharedMemoryChunk : public MediaMemoryChunk {
+ public:
+ SharedMemoryChunk(scoped_ptr<base::SharedMemory> shared_mem,
+ size_t size);
+ virtual ~SharedMemoryChunk();
+
+ // MediaMemoryChunk implementation.
+ virtual void* data() const override;
gunsch 2014/12/20 22:41:33 remove "virtual" upstream for overridden methods;
erickung1 2014/12/21 11:10:46 Done.
+ virtual size_t size() const override;
+ virtual bool valid() const override;
+
+ private:
+ scoped_ptr<base::SharedMemory> shared_mem_;
+ size_t size_;
+
+ DISALLOW_COPY_AND_ASSIGN(SharedMemoryChunk);
gunsch 2014/12/20 22:41:33 include base/macros.h for this
erickung1 2014/12/21 11:10:46 Done.
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_
+

Powered by Google App Engine
This is Rietveld 408576698