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

Unified Diff: content/renderer/pepper/pepper_platform_video_capture_impl.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_platform_video_capture_impl.cc
diff --git a/content/renderer/pepper/pepper_platform_video_capture_impl.cc b/content/renderer/pepper/pepper_platform_video_capture_impl.cc
index 39ee60922df0fc0db4db3f166c4f3d572a12c756..5135a117c1b54e934ac8e46736a16c57d2f9b781 100644
--- a/content/renderer/pepper/pepper_platform_video_capture_impl.cc
+++ b/content/renderer/pepper/pepper_platform_video_capture_impl.cc
@@ -33,9 +33,10 @@ PepperPlatformVideoCaptureImpl::PepperPlatformVideoCaptureImpl(
} else {
// We need to open the device and obtain the label and session ID before
// initializing.
- if (plugin_delegate_) {
+ if (plugin_delegate_.get()) {
plugin_delegate_->OpenDevice(
- PP_DEVICETYPE_DEV_VIDEOCAPTURE, device_id,
+ PP_DEVICETYPE_DEV_VIDEOCAPTURE,
+ device_id,
base::Bind(&PepperPlatformVideoCaptureImpl::OnDeviceOpened, this));
}
}
@@ -150,7 +151,7 @@ PepperPlatformVideoCaptureImpl::~PepperPlatformVideoCaptureImpl() {
manager->RemoveDevice(session_id_, handler_proxy_.get());
}
- if (plugin_delegate_ && !label_.empty())
+ if (plugin_delegate_.get() && !label_.empty())
plugin_delegate_->CloseDevice(label_);
}
@@ -163,7 +164,7 @@ void PepperPlatformVideoCaptureImpl::Initialize() {
void PepperPlatformVideoCaptureImpl::OnDeviceOpened(int request_id,
bool succeeded,
const std::string& label) {
- succeeded = succeeded && plugin_delegate_;
+ succeeded = succeeded && plugin_delegate_.get();
if (succeeded) {
label_ = label;
session_id_ = plugin_delegate_->GetSessionID(PP_DEVICETYPE_DEV_VIDEOCAPTURE,
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_input_impl.cc ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698