| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "media/mojo/services/mojo_cdm_allocator.h" | 5 #include "media/mojo/services/mojo_cdm_allocator.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/bind.h" |
| 9 #include "base/callback.h" | 10 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 11 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 12 #include "base/numerics/safe_conversions.h" | 13 #include "base/numerics/safe_conversions.h" |
| 13 #include "base/numerics/safe_math.h" | 14 #include "base/numerics/safe_math.h" |
| 14 #include "media/cdm/api/content_decryption_module.h" | 15 #include "media/cdm/api/content_decryption_module.h" |
| 15 #include "media/cdm/cdm_helpers.h" | 16 #include "media/cdm/cdm_helpers.h" |
| 16 #include "media/mojo/common/mojo_shared_buffer_video_frame.h" | 17 #include "media/mojo/common/mojo_shared_buffer_video_frame.h" |
| 17 #include "mojo/public/cpp/system/buffer.h" | 18 #include "mojo/public/cpp/system/buffer.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 MojoHandle MojoCdmAllocator::GetHandleForTesting(cdm::Buffer* buffer) { | 244 MojoHandle MojoCdmAllocator::GetHandleForTesting(cdm::Buffer* buffer) { |
| 244 MojoCdmBuffer* mojo_buffer = static_cast<MojoCdmBuffer*>(buffer); | 245 MojoCdmBuffer* mojo_buffer = static_cast<MojoCdmBuffer*>(buffer); |
| 245 return mojo_buffer->Handle().value(); | 246 return mojo_buffer->Handle().value(); |
| 246 } | 247 } |
| 247 | 248 |
| 248 size_t MojoCdmAllocator::GetAvailableBufferCountForTesting() { | 249 size_t MojoCdmAllocator::GetAvailableBufferCountForTesting() { |
| 249 return available_buffers_.size(); | 250 return available_buffers_.size(); |
| 250 } | 251 } |
| 251 | 252 |
| 252 } // namespace media | 253 } // namespace media |
| OLD | NEW |