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

Side by Side Diff: ppapi/proxy/plugin_resource.h

Issue 467303005: Remove implicit conversions from scoped_refptr to T* in ppapi/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_H_
6 #define PPAPI_PROXY_PLUGIN_RESOURCE_H_ 6 #define PPAPI_PROXY_PLUGIN_RESOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 "Class", IPC_MESSAGE_ID_CLASS(msg.type()), 200 "Class", IPC_MESSAGE_ID_CLASS(msg.type()),
201 "Line", IPC_MESSAGE_ID_LINE(msg.type())); 201 "Line", IPC_MESSAGE_ID_LINE(msg.type()));
202 ResourceMessageCallParams params(pp_resource(), next_sequence_number_++); 202 ResourceMessageCallParams params(pp_resource(), next_sequence_number_++);
203 // Stash the |callback| in |callbacks_| identified by the sequence number of 203 // Stash the |callback| in |callbacks_| identified by the sequence number of
204 // the call. 204 // the call.
205 scoped_refptr<PluginResourceCallbackBase> plugin_callback( 205 scoped_refptr<PluginResourceCallbackBase> plugin_callback(
206 new PluginResourceCallback<ReplyMsgClass, CallbackType>(callback)); 206 new PluginResourceCallback<ReplyMsgClass, CallbackType>(callback));
207 callbacks_.insert(std::make_pair(params.sequence(), plugin_callback)); 207 callbacks_.insert(std::make_pair(params.sequence(), plugin_callback));
208 params.set_has_callback(); 208 params.set_has_callback();
209 209
210 if (resource_reply_thread_registrar_) { 210 if (resource_reply_thread_registrar_.get()) {
211 resource_reply_thread_registrar_->Register( 211 resource_reply_thread_registrar_->Register(
212 pp_resource(), params.sequence(), reply_thread_hint); 212 pp_resource(), params.sequence(), reply_thread_hint);
213 } 213 }
214 SendResourceCall(dest, params, msg); 214 SendResourceCall(dest, params, msg);
215 return params.sequence(); 215 return params.sequence();
216 } 216 }
217 217
218 template <class ReplyMsgClass> 218 template <class ReplyMsgClass>
219 int32_t PluginResource::SyncCall(Destination dest, const IPC::Message& msg) { 219 int32_t PluginResource::SyncCall(Destination dest, const IPC::Message& msg) {
220 IPC::Message reply; 220 IPC::Message reply;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 if (UnpackMessage<ReplyMsgClass>(reply, a, b, c, d, e)) 280 if (UnpackMessage<ReplyMsgClass>(reply, a, b, c, d, e))
281 return result; 281 return result;
282 return PP_ERROR_FAILED; 282 return PP_ERROR_FAILED;
283 } 283 }
284 284
285 } // namespace proxy 285 } // namespace proxy
286 } // namespace ppapi 286 } // namespace ppapi
287 287
288 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_ 288 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698