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/renderer_host/media/video_capture_controller.h" | 5 #include "content/browser/renderer_host/media/video_capture_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // These mock methods are delegated to by our fake implementation of | 63 // These mock methods are delegated to by our fake implementation of |
64 // VideoCaptureControllerEventHandler, to be used in EXPECT_CALL(). | 64 // VideoCaptureControllerEventHandler, to be used in EXPECT_CALL(). |
65 MOCK_METHOD2(DoBufferCreated, void(VideoCaptureControllerID, int buffer_id)); | 65 MOCK_METHOD2(DoBufferCreated, void(VideoCaptureControllerID, int buffer_id)); |
66 MOCK_METHOD2(DoBufferDestroyed, | 66 MOCK_METHOD2(DoBufferDestroyed, |
67 void(VideoCaptureControllerID, int buffer_id)); | 67 void(VideoCaptureControllerID, int buffer_id)); |
68 MOCK_METHOD2(DoBufferReady, void(VideoCaptureControllerID, const gfx::Size&)); | 68 MOCK_METHOD2(DoBufferReady, void(VideoCaptureControllerID, const gfx::Size&)); |
69 MOCK_METHOD1(DoEnded, void(VideoCaptureControllerID)); | 69 MOCK_METHOD1(DoEnded, void(VideoCaptureControllerID)); |
70 MOCK_METHOD1(DoError, void(VideoCaptureControllerID)); | 70 MOCK_METHOD1(DoError, void(VideoCaptureControllerID)); |
71 MOCK_METHOD1(OnStarted, void(VideoCaptureControllerID)); | 71 MOCK_METHOD1(OnStarted, void(VideoCaptureControllerID)); |
| 72 MOCK_METHOD1(OnStartedUsingGpuDecode, void(VideoCaptureControllerID)); |
72 | 73 |
73 void OnError(VideoCaptureControllerID id) override { DoError(id); } | 74 void OnError(VideoCaptureControllerID id) override { DoError(id); } |
74 void OnBufferCreated(VideoCaptureControllerID id, | 75 void OnBufferCreated(VideoCaptureControllerID id, |
75 mojo::ScopedSharedBufferHandle handle, | 76 mojo::ScopedSharedBufferHandle handle, |
76 int length, | 77 int length, |
77 int buffer_id) override { | 78 int buffer_id) override { |
78 DoBufferCreated(id, buffer_id); | 79 DoBufferCreated(id, buffer_id); |
79 } | 80 } |
80 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override { | 81 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override { |
81 DoBufferDestroyed(id, buffer_id); | 82 DoBufferDestroyed(id, buffer_id); |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 EXPECT_CALL(*client_b_, OnStarted(_)); | 829 EXPECT_CALL(*client_b_, OnStarted(_)); |
829 device_client_->OnStarted(); | 830 device_client_->OnStarted(); |
830 | 831 |
831 // VideoCaptureController will take care of the OnStarted event for the | 832 // VideoCaptureController will take care of the OnStarted event for the |
832 // clients who join later. | 833 // clients who join later. |
833 EXPECT_CALL(*client_a_, OnStarted(_)); | 834 EXPECT_CALL(*client_a_, OnStarted(_)); |
834 controller_->AddClient(client_a_route_2, client_a_.get(), 200, session_200); | 835 controller_->AddClient(client_a_route_2, client_a_.get(), 200, session_200); |
835 } | 836 } |
836 } | 837 } |
837 } // namespace content | 838 } // namespace content |
OLD | NEW |