Chromium Code Reviews

Side by Side Diff: chromecast/media/cma/ipc/media_message_fifo.cc

Issue 837453003: Chromecast: virtual/override cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed a few spots Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "chromecast/media/cma/ipc/media_message_fifo.h" 5 #include "chromecast/media/cma/ipc/media_message_fifo.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 42 matching lines...)
53 53
54 void MediaMessageFlag::Invalidate() { 54 void MediaMessageFlag::Invalidate() {
55 flag_ = false; 55 flag_ = false;
56 } 56 }
57 57
58 class FifoOwnedMemory : public MediaMemoryChunk { 58 class FifoOwnedMemory : public MediaMemoryChunk {
59 public: 59 public:
60 FifoOwnedMemory(void* data, size_t size, 60 FifoOwnedMemory(void* data, size_t size,
61 const scoped_refptr<MediaMessageFlag>& flag, 61 const scoped_refptr<MediaMessageFlag>& flag,
62 const base::Closure& release_msg_cb); 62 const base::Closure& release_msg_cb);
63 virtual ~FifoOwnedMemory(); 63 ~FifoOwnedMemory() override;
64 64
65 // MediaMemoryChunk implementation. 65 // MediaMemoryChunk implementation.
66 virtual void* data() const override { return data_; } 66 void* data() const override { return data_; }
67 virtual size_t size() const override { return size_; } 67 size_t size() const override { return size_; }
68 virtual bool valid() const override { return flag_->IsValid(); } 68 bool valid() const override { return flag_->IsValid(); }
69 69
70 private: 70 private:
71 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 71 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
72 base::Closure release_msg_cb_; 72 base::Closure release_msg_cb_;
73 73
74 void* const data_; 74 void* const data_;
75 const size_t size_; 75 const size_t size_;
76 scoped_refptr<MediaMessageFlag> flag_; 76 scoped_refptr<MediaMessageFlag> flag_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(FifoOwnedMemory); 78 DISALLOW_COPY_AND_ASSIGN(FifoOwnedMemory);
(...skipping 315 matching lines...)
394 void MediaMessageFifo::CommitInternalRead(size_t new_rd_offset) { 394 void MediaMessageFifo::CommitInternalRead(size_t new_rd_offset) {
395 internal_rd_offset_ = new_rd_offset; 395 internal_rd_offset_ = new_rd_offset;
396 } 396 }
397 397
398 void MediaMessageFifo::CommitInternalWrite(size_t new_wr_offset) { 398 void MediaMessageFifo::CommitInternalWrite(size_t new_wr_offset) {
399 internal_wr_offset_ = new_wr_offset; 399 internal_wr_offset_ = new_wr_offset;
400 } 400 }
401 401
402 } // namespace media 402 } // namespace media
403 } // namespace chromecast 403 } // namespace chromecast
OLDNEW

Powered by Google App Engine