| 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 "content/renderer/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 374 } |
| 375 private: | 375 private: |
| 376 scoped_ptr<PluginCallback> callback_; | 376 scoped_ptr<PluginCallback> callback_; |
| 377 }; | 377 }; |
| 378 | 378 |
| 379 class PlatformVideoCaptureImpl | 379 class PlatformVideoCaptureImpl |
| 380 : public webkit::ppapi::PluginDelegate::PlatformVideoCapture { | 380 : public webkit::ppapi::PluginDelegate::PlatformVideoCapture { |
| 381 public: | 381 public: |
| 382 PlatformVideoCaptureImpl(media::VideoCapture::EventHandler* handler) | 382 PlatformVideoCaptureImpl(media::VideoCapture::EventHandler* handler) |
| 383 : handler_proxy_(new media::VideoCaptureHandlerProxy( | 383 : handler_proxy_(new media::VideoCaptureHandlerProxy( |
| 384 handler, base::MessageLoopProxy::CreateForCurrentThread())) { | 384 handler, base::MessageLoopProxy::current())) { |
| 385 VideoCaptureImplManager* manager = | 385 VideoCaptureImplManager* manager = |
| 386 RenderThread::current()->video_capture_impl_manager(); | 386 RenderThread::current()->video_capture_impl_manager(); |
| 387 // 1 means the "default" video capture device. | 387 // 1 means the "default" video capture device. |
| 388 // TODO(piman): Add a way to enumerate devices and pass them through the | 388 // TODO(piman): Add a way to enumerate devices and pass them through the |
| 389 // API. | 389 // API. |
| 390 video_capture_ = manager->AddDevice(1, handler_proxy_.get()); | 390 video_capture_ = manager->AddDevice(1, handler_proxy_.get()); |
| 391 } | 391 } |
| 392 | 392 |
| 393 // Overrides from media::VideoCapture::EventHandler | 393 // Overrides from media::VideoCapture::EventHandler |
| 394 virtual ~PlatformVideoCaptureImpl() { | 394 virtual ~PlatformVideoCaptureImpl() { |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 | 1467 |
| 1468 ppapi::Preferences PepperPluginDelegateImpl::GetPreferences() { | 1468 ppapi::Preferences PepperPluginDelegateImpl::GetPreferences() { |
| 1469 return ppapi::Preferences(render_view_->webkit_preferences()); | 1469 return ppapi::Preferences(render_view_->webkit_preferences()); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 void PepperPluginDelegateImpl::PublishInitialPolicy( | 1472 void PepperPluginDelegateImpl::PublishInitialPolicy( |
| 1473 scoped_refptr<webkit::ppapi::PluginInstance> instance, | 1473 scoped_refptr<webkit::ppapi::PluginInstance> instance, |
| 1474 const std::string& policy) { | 1474 const std::string& policy) { |
| 1475 instance->HandlePolicyUpdate(policy); | 1475 instance->HandlePolicyUpdate(policy); |
| 1476 } | 1476 } |
| OLD | NEW |