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

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

Issue 2688523002: Revert of Use timer task queue for RenderMediaLog (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | content/renderer/media/render_media_log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 15 matching lines...) Expand all
26 // 26 //
27 // It also caches the last error events to support renderer-side reporting to 27 // It also caches the last error events to support renderer-side reporting to
28 // entities like HTMLMediaElement and devtools console. 28 // entities like HTMLMediaElement and devtools console.
29 // 29 //
30 // To minimize the number of events sent over the wire, only the latest event 30 // To minimize the number of events sent over the wire, only the latest event
31 // added is sent for high frequency events (e.g., BUFFERED_EXTENTS_CHANGED). 31 // added is sent for high frequency events (e.g., BUFFERED_EXTENTS_CHANGED).
32 // 32 //
33 // It must be constructed on the render thread. 33 // It must be constructed on the render thread.
34 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog { 34 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog {
35 public: 35 public:
36 explicit RenderMediaLog( 36 explicit RenderMediaLog(const GURL& security_origin);
37 const GURL& security_origin,
38 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
39 37
40 // MediaLog implementation. 38 // MediaLog implementation.
41 void AddEvent(std::unique_ptr<media::MediaLogEvent> event) override; 39 void AddEvent(std::unique_ptr<media::MediaLogEvent> event) override;
42 std::string GetLastErrorMessage() override; 40 std::string GetLastErrorMessage() override;
43 void RecordRapporWithSecurityOrigin(const std::string& metric) override; 41 void RecordRapporWithSecurityOrigin(const std::string& metric) override;
44 42
45 // Will reset |last_ipc_send_time_| with the value of NowTicks(). 43 // Will reset |last_ipc_send_time_| with the value of NowTicks().
46 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); 44 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
47 void SetTaskRunnerForTesting( 45 void SetTaskRunnerForTesting(
48 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); 46 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 78
81 // Holds a copy of the most recent PIPELINE_ERROR, if any. 79 // Holds a copy of the most recent PIPELINE_ERROR, if any.
82 std::unique_ptr<media::MediaLogEvent> last_pipeline_error_; 80 std::unique_ptr<media::MediaLogEvent> last_pipeline_error_;
83 81
84 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog); 82 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog);
85 }; 83 };
86 84
87 } // namespace content 85 } // namespace content
88 86
89 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ 87 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/render_media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698