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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_network_proxy_host.cc

Issue 281803003: Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/renderer_host/pepper/pepper_network_proxy_host.h" 5 #include "content/browser/renderer_host/pepper/pepper_network_proxy_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" 8 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
9 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h" 9 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (!proxy_service_) { 97 if (!proxy_service_) {
98 DLOG_IF(WARNING, proxy_service_) 98 DLOG_IF(WARNING, proxy_service_)
99 << "Failed to find a ProxyService for Pepper plugin."; 99 << "Failed to find a ProxyService for Pepper plugin.";
100 } 100 }
101 TryToSendUnsentRequests(); 101 TryToSendUnsentRequests();
102 } 102 }
103 103
104 int32_t PepperNetworkProxyHost::OnResourceMessageReceived( 104 int32_t PepperNetworkProxyHost::OnResourceMessageReceived(
105 const IPC::Message& msg, 105 const IPC::Message& msg,
106 ppapi::host::HostMessageContext* context) { 106 ppapi::host::HostMessageContext* context) {
107 IPC_BEGIN_MESSAGE_MAP(PepperNetworkProxyHost, msg) 107 PPAPI_BEGIN_MESSAGE_MAP(PepperNetworkProxyHost, msg)
108 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_NetworkProxy_GetProxyForURL, 108 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_NetworkProxy_GetProxyForURL,
109 OnMsgGetProxyForURL) 109 OnMsgGetProxyForURL)
110 IPC_END_MESSAGE_MAP() 110 PPAPI_END_MESSAGE_MAP()
111 return PP_ERROR_FAILED; 111 return PP_ERROR_FAILED;
112 } 112 }
113 113
114 int32_t PepperNetworkProxyHost::OnMsgGetProxyForURL( 114 int32_t PepperNetworkProxyHost::OnMsgGetProxyForURL(
115 ppapi::host::HostMessageContext* context, 115 ppapi::host::HostMessageContext* context,
116 const std::string& url) { 116 const std::string& url) {
117 GURL gurl(url); 117 GURL gurl(url);
118 if (gurl.is_valid()) { 118 if (gurl.is_valid()) {
119 UnsentRequest request = {gurl, context->MakeReplyMessageContext()}; 119 UnsentRequest request = {gurl, context->MakeReplyMessageContext()};
120 unsent_requests_.push(request); 120 unsent_requests_.push(request);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void PepperNetworkProxyHost::SendFailureReply( 180 void PepperNetworkProxyHost::SendFailureReply(
181 int32_t error, 181 int32_t error,
182 ppapi::host::ReplyMessageContext context) { 182 ppapi::host::ReplyMessageContext context) {
183 context.params.set_result(error); 183 context.params.set_result(error);
184 host()->SendReply( 184 host()->SendReply(
185 context, PpapiPluginMsg_NetworkProxy_GetProxyForURLReply(std::string())); 185 context, PpapiPluginMsg_NetworkProxy_GetProxyForURLReply(std::string()));
186 } 186 }
187 187
188 } // namespace content 188 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698