Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller_unittest.cc

Issue 2860573008: Add more video capture log messages to WebRTC log (Closed)
Patch Set: Incorporate suggestions from PatchSet 1 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 29 matching lines...) Expand all
40 40
41 using ::testing::_; 41 using ::testing::_;
42 using ::testing::AnyNumber; 42 using ::testing::AnyNumber;
43 using ::testing::InSequence; 43 using ::testing::InSequence;
44 using ::testing::Mock; 44 using ::testing::Mock;
45 using ::testing::SaveArg; 45 using ::testing::SaveArg;
46 46
47 namespace content { 47 namespace content {
48 48
49 std::unique_ptr<media::VideoCaptureJpegDecoder> CreateGpuJpegDecoder( 49 std::unique_ptr<media::VideoCaptureJpegDecoder> CreateGpuJpegDecoder(
50 const media::VideoCaptureJpegDecoder::DecodeDoneCB& decode_done_cb) { 50 media::VideoCaptureJpegDecoder::DecodeDoneCB decode_done_cb) {
51 return base::MakeUnique<content::VideoCaptureGpuJpegDecoder>(decode_done_cb); 51 return base::MakeUnique<content::VideoCaptureGpuJpegDecoder>(
52 std::move(decode_done_cb), base::Bind([](const std::string&) {}));
52 } 53 }
53 54
54 class MockVideoCaptureControllerEventHandler 55 class MockVideoCaptureControllerEventHandler
55 : public VideoCaptureControllerEventHandler { 56 : public VideoCaptureControllerEventHandler {
56 public: 57 public:
57 explicit MockVideoCaptureControllerEventHandler( 58 explicit MockVideoCaptureControllerEventHandler(
58 VideoCaptureController* controller) 59 VideoCaptureController* controller)
59 : controller_(controller), resource_utilization_(-1.0) {} 60 : controller_(controller), resource_utilization_(-1.0) {}
60 ~MockVideoCaptureControllerEventHandler() override {} 61 ~MockVideoCaptureControllerEventHandler() override {}
61 void set_enable_auto_return_buffer_on_buffer_ready(bool enable) { 62 void set_enable_auto_return_buffer_on_buffer_ready(bool enable) {
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 EXPECT_CALL(*client_b_, OnStarted(_)); 832 EXPECT_CALL(*client_b_, OnStarted(_));
832 device_client_->OnStarted(); 833 device_client_->OnStarted();
833 834
834 // VideoCaptureController will take care of the OnStarted event for the 835 // VideoCaptureController will take care of the OnStarted event for the
835 // clients who join later. 836 // clients who join later.
836 EXPECT_CALL(*client_a_, OnStarted(_)); 837 EXPECT_CALL(*client_a_, OnStarted(_));
837 controller_->AddClient(client_a_route_2, client_a_.get(), 200, session_200); 838 controller_->AddClient(client_a_route_2, client_a_.get(), 200, session_200);
838 } 839 }
839 } 840 }
840 } // namespace content 841 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698