OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/renderer/layout_test/test_video_frame_provider.h" | 5 #include "content/shell/renderer/layout_test/test_video_frame_provider.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/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 TestVideoFrameProvider::TestVideoFrameProvider( | 15 TestVideoFrameProvider::TestVideoFrameProvider( |
16 const gfx::Size& size, | 16 const gfx::Size& size, |
17 const base::TimeDelta& frame_duration, | 17 const base::TimeDelta& frame_duration, |
18 const base::Closure& error_cb, | 18 const base::Closure& error_cb, |
19 const VideoFrameProvider::RepaintCB& repaint_cb) | 19 const VideoFrameProvider::RepaintCB& repaint_cb) |
20 : task_runner_(base::ThreadTaskRunnerHandle::Get()), | 20 : task_runner_(base::ThreadTaskRunnerHandle::Get()), |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 repaint_cb_.Run(video_frame); | 73 repaint_cb_.Run(video_frame); |
74 } | 74 } |
75 | 75 |
76 current_time_ += frame_duration_; | 76 current_time_ += frame_duration_; |
77 task_runner_->PostDelayedTask( | 77 task_runner_->PostDelayedTask( |
78 FROM_HERE, base::Bind(&TestVideoFrameProvider::GenerateFrame, this), | 78 FROM_HERE, base::Bind(&TestVideoFrameProvider::GenerateFrame, this), |
79 frame_duration_); | 79 frame_duration_); |
80 } | 80 } |
81 | 81 |
82 } // namespace content | 82 } // namespace content |
OLD | NEW |