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

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

Issue 1017503002: VideoCaptureHost/VideoCaptureControllerEventHandler cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded BindToCurrentLoop() Created 5 years, 9 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 base::SharedMemoryHandle handle, 132 base::SharedMemoryHandle handle,
133 int length, 133 int length,
134 int buffer_id)); 134 int buffer_id));
135 MOCK_METHOD2(OnBufferFreed, 135 MOCK_METHOD2(OnBufferFreed,
136 void(int device_id, int buffer_id)); 136 void(int device_id, int buffer_id));
137 MOCK_METHOD6(OnBufferFilled, 137 MOCK_METHOD6(OnBufferFilled,
138 void(int device_id, 138 void(int device_id,
139 int buffer_id, 139 int buffer_id,
140 const gfx::Size& coded_size, 140 const gfx::Size& coded_size,
141 const gfx::Rect& visible_rect, 141 const gfx::Rect& visible_rect,
142 base::TimeTicks timestamp, 142 const base::TimeTicks& timestamp,
143 const base::DictionaryValue& metadata)); 143 const base::DictionaryValue& metadata));
144 MOCK_METHOD6(OnMailboxBufferFilled, 144 MOCK_METHOD6(OnMailboxBufferFilled,
145 void(int device_id, 145 void(int device_id,
146 int buffer_id, 146 int buffer_id,
147 const gpu::MailboxHolder& mailbox_holder, 147 const gpu::MailboxHolder& mailbox_holder,
148 const gfx::Size& packed_frame_size, 148 const gfx::Size& packed_frame_size,
149 base::TimeTicks timestamp, 149 const base::TimeTicks& timestamp,
150 const base::DictionaryValue& metadata)); 150 const base::DictionaryValue& metadata));
151 MOCK_METHOD2(OnStateChanged, void(int device_id, VideoCaptureState state)); 151 MOCK_METHOD2(OnStateChanged, void(int device_id, VideoCaptureState state));
152 152
153 // Use class DumpVideo to write I420 video to file. 153 // Use class DumpVideo to write I420 video to file.
154 void SetDumpVideo(bool enable) { 154 void SetDumpVideo(bool enable) {
155 dump_video_ = enable; 155 dump_video_ = enable;
156 } 156 }
157 157
158 void SetReturnReceivedDibs(bool enable) { 158 void SetReturnReceivedDibs(bool enable) {
159 return_buffers_ = enable; 159 return_buffers_ = enable;
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 #ifdef DUMP_VIDEO 560 #ifdef DUMP_VIDEO
561 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { 561 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) {
562 CaptureAndDumpVideo(640, 480, 30); 562 CaptureAndDumpVideo(640, 480, 30);
563 } 563 }
564 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { 564 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) {
565 CaptureAndDumpVideo(1280, 720, 30); 565 CaptureAndDumpVideo(1280, 720, 30);
566 } 566 }
567 #endif 567 #endif
568 568
569 } // namespace content 569 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698