OLD | NEW |
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 #include "content/renderer/media/render_media_log.h" | 5 #include "content/renderer/media/render_media_log.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "base/thread_task_runner_handle.h" | 11 #include "base/thread_task_runner_handle.h" |
| 12 #include "base/time/default_tick_clock.h" |
12 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
13 #include "content/public/renderer/render_thread.h" | 14 #include "content/public/renderer/render_thread.h" |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 // Print an event to the chromium log. | 18 // Print an event to the chromium log. |
18 void Log(media::MediaLogEvent* event) { | 19 void Log(media::MediaLogEvent* event) { |
19 if (event->type == media::MediaLogEvent::PIPELINE_ERROR) { | 20 if (event->type == media::MediaLogEvent::PIPELINE_ERROR) { |
20 LOG(ERROR) << "MediaEvent: " | 21 LOG(ERROR) << "MediaEvent: " |
21 << media::MediaLog::MediaEventToLogString(*event); | 22 << media::MediaLog::MediaEventToLogString(*event); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 tick_clock_.swap(tick_clock); | 105 tick_clock_.swap(tick_clock); |
105 last_ipc_send_time_ = tick_clock_->NowTicks(); | 106 last_ipc_send_time_ = tick_clock_->NowTicks(); |
106 } | 107 } |
107 | 108 |
108 void RenderMediaLog::SetTaskRunnerForTesting( | 109 void RenderMediaLog::SetTaskRunnerForTesting( |
109 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { | 110 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { |
110 task_runner_ = task_runner; | 111 task_runner_ = task_runner; |
111 } | 112 } |
112 | 113 |
113 } // namespace content | 114 } // namespace content |
OLD | NEW |