| 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 media::VideoCaptureParams parameters; | 47 media::VideoCaptureParams parameters; |
| 48 | 48 |
| 49 // Buffers used by this client. | 49 // Buffers used by this client. |
| 50 std::set<int> buffers; | 50 std::set<int> buffers; |
| 51 | 51 |
| 52 // State of capture session, controlled by VideoCaptureManager directly. | 52 // State of capture session, controlled by VideoCaptureManager directly. |
| 53 bool session_closed; | 53 bool session_closed; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 struct VideoCaptureController::SharedDIB { | 56 struct VideoCaptureController::SharedDIB { |
| 57 SharedDIB(base::SharedMemory* ptr) | 57 explicit SharedDIB(base::SharedMemory* ptr) |
| 58 : shared_memory(ptr), | 58 : shared_memory(ptr), |
| 59 references(0) { | 59 references(0) { |
| 60 } | 60 } |
| 61 | 61 |
| 62 ~SharedDIB() {} | 62 ~SharedDIB() {} |
| 63 | 63 |
| 64 // The memory created to be shared with renderer processes. | 64 // The memory created to be shared with renderer processes. |
| 65 scoped_ptr<base::SharedMemory> shared_memory; | 65 scoped_ptr<base::SharedMemory> shared_memory; |
| 66 | 66 |
| 67 // Number of renderer processes which hold this shared memory. | 67 // Number of renderer processes which hold this shared memory. |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 base::AutoLock lock(lock_); | 593 base::AutoLock lock(lock_); |
| 594 for (DIBMap::iterator dib_it = owned_dibs_.begin(); | 594 for (DIBMap::iterator dib_it = owned_dibs_.begin(); |
| 595 dib_it != owned_dibs_.end(); dib_it++) { | 595 dib_it != owned_dibs_.end(); dib_it++) { |
| 596 if (dib_it->second->references > 0) | 596 if (dib_it->second->references > 0) |
| 597 return true; | 597 return true; |
| 598 } | 598 } |
| 599 return false; | 599 return false; |
| 600 } | 600 } |
| 601 | 601 |
| 602 } // namespace content | 602 } // namespace content |
| OLD | NEW |