OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/proxy/ppb_video_capture_proxy.h" | 5 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 PluginDispatcher* GetDispatcher() const { | 242 PluginDispatcher* GetDispatcher() const { |
243 return PluginDispatcher::GetForResource(this); | 243 return PluginDispatcher::GetForResource(this); |
244 } | 244 } |
245 | 245 |
246 uint32_t status_; | 246 uint32_t status_; |
247 std::vector<bool> buffer_in_use_; | 247 std::vector<bool> buffer_in_use_; |
248 DISALLOW_COPY_AND_ASSIGN(VideoCapture); | 248 DISALLOW_COPY_AND_ASSIGN(VideoCapture); |
249 }; | 249 }; |
250 | 250 |
251 VideoCapture::VideoCapture(const HostResource& resource) | 251 VideoCapture::VideoCapture(const HostResource& resource) |
252 : Resource(resource), | 252 : Resource(OBJECT_IS_PROXY, resource), |
253 status_(PP_VIDEO_CAPTURE_STATUS_STOPPED) { | 253 status_(PP_VIDEO_CAPTURE_STATUS_STOPPED) { |
254 } | 254 } |
255 | 255 |
256 VideoCapture::~VideoCapture() { | 256 VideoCapture::~VideoCapture() { |
257 } | 257 } |
258 | 258 |
259 ppapi::thunk::PPB_VideoCapture_API* VideoCapture::AsPPB_VideoCapture_API() { | 259 ppapi::thunk::PPB_VideoCapture_API* VideoCapture::AsPPB_VideoCapture_API() { |
260 return this; | 260 return this; |
261 } | 261 } |
262 | 262 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 return; | 431 return; |
432 | 432 |
433 VideoCapture* capture = static_cast<VideoCapture*>(enter.object()); | 433 VideoCapture* capture = static_cast<VideoCapture*>(enter.object()); |
434 capture->SetBufferInUse(buffer); | 434 capture->SetBufferInUse(buffer); |
435 ppp_video_capture_impl_->OnBufferReady( | 435 ppp_video_capture_impl_->OnBufferReady( |
436 host_resource.instance(), capture->pp_resource(), buffer); | 436 host_resource.instance(), capture->pp_resource(), buffer); |
437 } | 437 } |
438 | 438 |
439 } // namespace proxy | 439 } // namespace proxy |
440 } // namespace ppapi | 440 } // namespace ppapi |
OLD | NEW |