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

Side by Side Diff: content/renderer/media/render_media_log.h

Issue 670623002: Change base::TickClock to a ref counted class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_redesign
Patch Set: y Created 6 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_
6 #define CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ 6 #define CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 12 matching lines...) Expand all
23 // To minimize the number of events sent over the wire, only the latest event 23 // To minimize the number of events sent over the wire, only the latest event
24 // added is sent for high frequency events (e.g., BUFFERED_EXTENTS_CHANGED). 24 // added is sent for high frequency events (e.g., BUFFERED_EXTENTS_CHANGED).
25 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog { 25 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog {
26 public: 26 public:
27 RenderMediaLog(); 27 RenderMediaLog();
28 28
29 // MediaLog implementation. 29 // MediaLog implementation.
30 virtual void AddEvent(scoped_ptr<media::MediaLogEvent> event) override; 30 virtual void AddEvent(scoped_ptr<media::MediaLogEvent> event) override;
31 31
32 // Will reset |last_ipc_send_time_| with the value of NowTicks(). 32 // Will reset |last_ipc_send_time_| with the value of NowTicks().
33 void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock); 33 void SetTickClockForTesting(const scoped_refptr<base::TickClock>& tick_clock);
34 34
35 private: 35 private:
36 virtual ~RenderMediaLog(); 36 virtual ~RenderMediaLog();
37 37
38 scoped_refptr<base::MessageLoopProxy> render_loop_; 38 scoped_refptr<base::MessageLoopProxy> render_loop_;
39 scoped_ptr<base::TickClock> tick_clock_; 39 scoped_refptr<base::TickClock> tick_clock_;
40 base::TimeTicks last_ipc_send_time_; 40 base::TimeTicks last_ipc_send_time_;
41 std::vector<media::MediaLogEvent> queued_media_events_; 41 std::vector<media::MediaLogEvent> queued_media_events_;
42 42
43 // Limits the number buffered extents changed events we send over IPC to one. 43 // Limits the number buffered extents changed events we send over IPC to one.
44 scoped_ptr<media::MediaLogEvent> last_buffered_extents_changed_event_; 44 scoped_ptr<media::MediaLogEvent> last_buffered_extents_changed_event_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog); 46 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog);
47 }; 47 };
48 48
49 } // namespace content 49 } // namespace content
50 50
51 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ 51 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_
OLDNEW
« no previous file with comments | « content/browser/media/audio_stream_monitor_unittest.cc ('k') | content/renderer/media/render_media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698