| 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 "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/debug/debugger.h" | 8 #include "base/debug/debugger.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 AutoReleaseBuffer( | 412 AutoReleaseBuffer( |
| 413 const scoped_refptr<VideoCaptureBufferPool>& pool, | 413 const scoped_refptr<VideoCaptureBufferPool>& pool, |
| 414 scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle, | 414 scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle, |
| 415 int buffer_id) | 415 int buffer_id) |
| 416 : id_(buffer_id), | 416 : id_(buffer_id), |
| 417 pool_(pool), | 417 pool_(pool), |
| 418 buffer_handle_(buffer_handle.Pass()) { | 418 buffer_handle_(buffer_handle.Pass()) { |
| 419 DCHECK(pool_.get()); | 419 DCHECK(pool_.get()); |
| 420 } | 420 } |
| 421 int id() const override { return id_; } | 421 int id() const override { return id_; } |
| 422 size_t size() const override { return buffer_handle_->size(); } | 422 gfx::Size dimensions() const override { return gfx::Size(); } |
| 423 size_t mapped_size() const override { |
| 424 return buffer_handle_->mapped_size(); |
| 425 } |
| 423 void* data(int plane) override { return buffer_handle_->data(plane); } | 426 void* data(int plane) override { return buffer_handle_->data(plane); } |
| 424 ClientBuffer AsClientBuffer(int plane) override { return nullptr; } | 427 ClientBuffer AsClientBuffer(int plane) override { return nullptr; } |
| 425 #if defined(OS_POSIX) | 428 #if defined(OS_POSIX) |
| 426 base::FileDescriptor AsPlatformFile() override { | 429 base::FileDescriptor AsPlatformFile() override { |
| 427 return base::FileDescriptor(); | 430 return base::FileDescriptor(); |
| 428 } | 431 } |
| 429 #endif | 432 #endif |
| 430 | 433 |
| 431 private: | 434 private: |
| 432 ~AutoReleaseBuffer() override { pool_->RelinquishProducerReservation(id_); } | 435 ~AutoReleaseBuffer() override { pool_->RelinquishProducerReservation(id_); } |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000)); | 1138 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000)); |
| 1136 RunTestForPreferredSize( | 1139 RunTestForPreferredSize( |
| 1137 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000)); | 1140 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000)); |
| 1138 RunTestForPreferredSize( | 1141 RunTestForPreferredSize( |
| 1139 policies[i], gfx::Size(837, 999), gfx::Size(837, 999)); | 1142 policies[i], gfx::Size(837, 999), gfx::Size(837, 999)); |
| 1140 } | 1143 } |
| 1141 } | 1144 } |
| 1142 | 1145 |
| 1143 } // namespace | 1146 } // namespace |
| 1144 } // namespace content | 1147 } // namespace content |
| OLD | NEW |