OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/memory/weak_ptr.h" | 6 #include "base/memory/weak_ptr.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "content/renderer/media/capturefromelement/html_video_element_capturer_
source.h" | 9 #include "content/renderer/media/capturefromelement/html_video_element_capturer_
source.h" |
10 #include "media/base/limits.h" | 10 #include "media/base/limits.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 bool didPassCORSAccessCheck() const override { return true; } | 68 bool didPassCORSAccessCheck() const override { return true; } |
69 double mediaTimeForTimeValue(double timeValue) const override { return 0.0; } | 69 double mediaTimeForTimeValue(double timeValue) const override { return 0.0; } |
70 unsigned decodedFrameCount() const override { return 0; } | 70 unsigned decodedFrameCount() const override { return 0; } |
71 unsigned droppedFrameCount() const override { return 0; } | 71 unsigned droppedFrameCount() const override { return 0; } |
72 unsigned corruptedFrameCount() const override { return 0; } | 72 unsigned corruptedFrameCount() const override { return 0; } |
73 size_t audioDecodedByteCount() const override { return 0; } | 73 size_t audioDecodedByteCount() const override { return 0; } |
74 size_t videoDecodedByteCount() const override { return 0; } | 74 size_t videoDecodedByteCount() const override { return 0; } |
75 | 75 |
76 void paint(blink::WebCanvas* canvas, | 76 void paint(blink::WebCanvas* canvas, |
77 const blink::WebRect& paint_rectangle, | 77 const blink::WebRect& paint_rectangle, |
78 SkPaint&) override { | 78 cc::PaintFlags&) override { |
79 // We could fill in |canvas| with a meaningful pattern in ARGB and verify | 79 // We could fill in |canvas| with a meaningful pattern in ARGB and verify |
80 // that is correctly captured (as I420) by HTMLVideoElementCapturerSource | 80 // that is correctly captured (as I420) by HTMLVideoElementCapturerSource |
81 // but I don't think that'll be easy/useful/robust, so just let go here. | 81 // but I don't think that'll be easy/useful/robust, so just let go here. |
82 return; | 82 return; |
83 } | 83 } |
84 }; | 84 }; |
85 | 85 |
86 class HTMLVideoElementCapturerSourceTest : public testing::Test { | 86 class HTMLVideoElementCapturerSourceTest : public testing::Test { |
87 public: | 87 public: |
88 HTMLVideoElementCapturerSourceTest() | 88 HTMLVideoElementCapturerSourceTest() |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 base::Bind(&HTMLVideoElementCapturerSourceTest::OnRunning, | 162 base::Bind(&HTMLVideoElementCapturerSourceTest::OnRunning, |
163 base::Unretained(this))); | 163 base::Unretained(this))); |
164 | 164 |
165 run_loop.Run(); | 165 run_loop.Run(); |
166 | 166 |
167 html_video_capturer_->StopCapture(); | 167 html_video_capturer_->StopCapture(); |
168 Mock::VerifyAndClearExpectations(this); | 168 Mock::VerifyAndClearExpectations(this); |
169 } | 169 } |
170 | 170 |
171 } // namespace content | 171 } // namespace content |
OLD | NEW |