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/browser/media/capture/web_contents_video_capture_device.h" | 5 #include "content/browser/media/capture/web_contents_video_capture_device.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 return media::VideoCaptureDevice::Client::Buffer(); | 315 return media::VideoCaptureDevice::Client::Buffer(); |
316 return media::VideoCaptureDeviceClient::MakeBufferStruct( | 316 return media::VideoCaptureDeviceClient::MakeBufferStruct( |
317 buffer_pool_, buffer_id, frame_feedback_id); | 317 buffer_pool_, buffer_id, frame_feedback_id); |
318 } | 318 } |
319 | 319 |
320 void OnError(const tracked_objects::Location& from_here, | 320 void OnError(const tracked_objects::Location& from_here, |
321 const std::string& reason) override { | 321 const std::string& reason) override { |
322 error_callback_.Run(); | 322 error_callback_.Run(); |
323 } | 323 } |
324 | 324 |
| 325 void OnStarted() override {} |
| 326 |
325 double GetBufferPoolUtilization() const override { return 0.0; } | 327 double GetBufferPoolUtilization() const override { return 0.0; } |
326 | 328 |
327 private: | 329 private: |
328 scoped_refptr<media::VideoCaptureBufferPool> buffer_pool_; | 330 scoped_refptr<media::VideoCaptureBufferPool> buffer_pool_; |
329 base::Callback<void(SkColor, const gfx::Size&)> report_callback_; | 331 base::Callback<void(SkColor, const gfx::Size&)> report_callback_; |
330 base::Closure error_callback_; | 332 base::Closure error_callback_; |
331 | 333 |
332 DISALLOW_COPY_AND_ASSIGN(StubClient); | 334 DISALLOW_COPY_AND_ASSIGN(StubClient); |
333 }; | 335 }; |
334 | 336 |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 for (int i = 0; i < 3; ++i) { | 1011 for (int i = 0; i < 3; ++i) { |
1010 SimulateRefreshFrameRequest(); | 1012 SimulateRefreshFrameRequest(); |
1011 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); | 1013 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); |
1012 } | 1014 } |
1013 | 1015 |
1014 device()->StopAndDeAllocate(); | 1016 device()->StopAndDeAllocate(); |
1015 } | 1017 } |
1016 | 1018 |
1017 } // namespace | 1019 } // namespace |
1018 } // namespace content | 1020 } // namespace content |
OLD | NEW |