Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/p2p/socket_dispatcher.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « content/renderer/p2p/socket_dispatcher.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698