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

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

Issue 100943002: Convert PepperBrowserConnection to be a RenderFrameObserver. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixes Created 7 years 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 | « ppapi/proxy/connection.h ('k') | no next file » | 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) 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/ppapi_messages.h" 9 #include "ppapi/proxy/ppapi_messages.h"
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ResourceMessageCallParams params(pp_resource(), GetNextSequence()); 108 ResourceMessageCallParams params(pp_resource(), GetNextSequence());
109 SendResourceCall(dest, params, msg); 109 SendResourceCall(dest, params, msg);
110 } 110 }
111 111
112 bool PluginResource::SendResourceCall( 112 bool PluginResource::SendResourceCall(
113 Destination dest, 113 Destination dest,
114 const ResourceMessageCallParams& call_params, 114 const ResourceMessageCallParams& call_params,
115 const IPC::Message& nested_msg) { 115 const IPC::Message& nested_msg) {
116 // For in-process plugins, we need to send the routing ID with the request. 116 // For in-process plugins, we need to send the routing ID with the request.
117 // The browser then uses that routing ID when sending the reply so it will be 117 // The browser then uses that routing ID when sending the reply so it will be
118 // routed back to the correct RenderViewImpl. 118 // routed back to the correct RenderFrameImpl.
119 if (dest == BROWSER && connection_.in_process) { 119 if (dest == BROWSER && connection_.in_process) {
120 return GetSender(dest)->Send(new PpapiHostMsg_InProcessResourceCall( 120 return GetSender(dest)->Send(new PpapiHostMsg_InProcessResourceCall(
121 connection_.browser_sender_routing_id, 121 connection_.browser_sender_routing_id,
122 call_params, 122 call_params,
123 nested_msg)); 123 nested_msg));
124 } else { 124 } else {
125 return GetSender(dest)->Send( 125 return GetSender(dest)->Send(
126 new PpapiHostMsg_ResourceCall(call_params, nested_msg)); 126 new PpapiHostMsg_ResourceCall(call_params, nested_msg));
127 } 127 }
128 } 128 }
(...skipping 22 matching lines...) Expand all
151 int32_t ret = next_sequence_number_; 151 int32_t ret = next_sequence_number_;
152 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) 152 if (next_sequence_number_ == std::numeric_limits<int32_t>::max())
153 next_sequence_number_ = 1; // Skip 0 which is invalid. 153 next_sequence_number_ = 1; // Skip 0 which is invalid.
154 else 154 else
155 next_sequence_number_++; 155 next_sequence_number_++;
156 return ret; 156 return ret;
157 } 157 }
158 158
159 } // namespace proxy 159 } // namespace proxy
160 } // namespace ppapi 160 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698