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

Side by Side Diff: content/renderer/pepper/pepper_device_enumeration_host_helper.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pepper_device_enumeration_host_helper.h" 5 #include "content/renderer/pepper/pepper_device_enumeration_host_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange, 126 PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange,
127 OnStopMonitoringDeviceChange) 127 OnStopMonitoringDeviceChange)
128 IPC_END_MESSAGE_MAP() 128 IPC_END_MESSAGE_MAP()
129 129
130 *handled = false; 130 *handled = false;
131 return PP_ERROR_FAILED; 131 return PP_ERROR_FAILED;
132 } 132 }
133 133
134 int32_t PepperDeviceEnumerationHostHelper::OnEnumerateDevices( 134 int32_t PepperDeviceEnumerationHostHelper::OnEnumerateDevices(
135 HostMessageContext* context) { 135 HostMessageContext* context) {
136 if (enumerate_devices_context_.get()) 136 if (enumerate_devices_context_)
137 return PP_ERROR_INPROGRESS; 137 return PP_ERROR_INPROGRESS;
138 138
139 enumerate_.reset(new ScopedRequest( 139 enumerate_.reset(new ScopedRequest(
140 this, 140 this,
141 base::Bind(&PepperDeviceEnumerationHostHelper::OnEnumerateDevicesComplete, 141 base::Bind(&PepperDeviceEnumerationHostHelper::OnEnumerateDevicesComplete,
142 base::Unretained(this)))); 142 base::Unretained(this))));
143 if (!enumerate_->requested()) 143 if (!enumerate_->requested())
144 return PP_ERROR_FAILED; 144 return PP_ERROR_FAILED;
145 145
146 enumerate_devices_context_.reset( 146 enumerate_devices_context_.reset(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 bool succeeded, 188 bool succeeded,
189 const std::vector<ppapi::DeviceRefData>& devices) { 189 const std::vector<ppapi::DeviceRefData>& devices) {
190 resource_host_->host()->SendUnsolicitedReply( 190 resource_host_->host()->SendUnsolicitedReply(
191 resource_host_->pp_resource(), 191 resource_host_->pp_resource(),
192 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange( 192 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange(
193 callback_id, 193 callback_id,
194 succeeded ? devices : std::vector<ppapi::DeviceRefData>())); 194 succeeded ? devices : std::vector<ppapi::DeviceRefData>()));
195 } 195 }
196 196
197 } // namespace content 197 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_broker_impl.cc ('k') | content/renderer/pepper/pepper_file_io_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698