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

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

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, 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
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 "ppapi/proxy/plugin_resource.h" 5 #include "ppapi/proxy/plugin_resource.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ppapi/proxy/plugin_globals.h" 9 #include "ppapi/proxy/plugin_globals.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 16 matching lines...) Expand all
27 PluginResource::~PluginResource() { 27 PluginResource::~PluginResource() {
28 if (sent_create_to_browser_) { 28 if (sent_create_to_browser_) {
29 connection_.browser_sender->Send( 29 connection_.browser_sender->Send(
30 new PpapiHostMsg_ResourceDestroyed(pp_resource())); 30 new PpapiHostMsg_ResourceDestroyed(pp_resource()));
31 } 31 }
32 if (sent_create_to_renderer_) { 32 if (sent_create_to_renderer_) {
33 connection_.renderer_sender->Send( 33 connection_.renderer_sender->Send(
34 new PpapiHostMsg_ResourceDestroyed(pp_resource())); 34 new PpapiHostMsg_ResourceDestroyed(pp_resource()));
35 } 35 }
36 36
37 if (resource_reply_thread_registrar_) 37 if (resource_reply_thread_registrar_.get())
38 resource_reply_thread_registrar_->Unregister(pp_resource()); 38 resource_reply_thread_registrar_->Unregister(pp_resource());
39 } 39 }
40 40
41 void PluginResource::OnReplyReceived( 41 void PluginResource::OnReplyReceived(
42 const proxy::ResourceMessageReplyParams& params, 42 const proxy::ResourceMessageReplyParams& params,
43 const IPC::Message& msg) { 43 const IPC::Message& msg) {
44 TRACE_EVENT2("ppapi proxy", "PluginResource::OnReplyReceived", 44 TRACE_EVENT2("ppapi proxy", "PluginResource::OnReplyReceived",
45 "Class", IPC_MESSAGE_ID_CLASS(msg.type()), 45 "Class", IPC_MESSAGE_ID_CLASS(msg.type()),
46 "Line", IPC_MESSAGE_ID_LINE(msg.type())); 46 "Line", IPC_MESSAGE_ID_LINE(msg.type()));
47 // Grab the callback for the reply sequence number and run it with |msg|. 47 // Grab the callback for the reply sequence number and run it with |msg|.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 int32_t ret = next_sequence_number_; 159 int32_t ret = next_sequence_number_;
160 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) 160 if (next_sequence_number_ == std::numeric_limits<int32_t>::max())
161 next_sequence_number_ = 1; // Skip 0 which is invalid. 161 next_sequence_number_ = 1; // Skip 0 which is invalid.
162 else 162 else
163 next_sequence_number_++; 163 next_sequence_number_++;
164 return ret; 164 return ret;
165 } 165 }
166 166
167 } // namespace proxy 167 } // namespace proxy
168 } // namespace ppapi 168 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698