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

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

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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
« no previous file with comments | « ppapi/proxy/ppb_url_loader_proxy.h ('k') | ppapi/proxy/ppb_url_request_info_proxy.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ppb_url_loader_proxy.h" 5 #include "ppapi/proxy/ppb_url_loader_proxy.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 const void* PPB_URLLoader_Proxy::GetSourceInterface() const { 243 const void* PPB_URLLoader_Proxy::GetSourceInterface() const {
244 return &ppb_urlloader; 244 return &ppb_urlloader;
245 } 245 }
246 246
247 InterfaceID PPB_URLLoader_Proxy::GetInterfaceId() const { 247 InterfaceID PPB_URLLoader_Proxy::GetInterfaceId() const {
248 return INTERFACE_ID_PPB_URL_LOADER; 248 return INTERFACE_ID_PPB_URL_LOADER;
249 } 249 }
250 250
251 void PPB_URLLoader_Proxy::OnMessageReceived(const IPC::Message& msg) { 251 bool PPB_URLLoader_Proxy::OnMessageReceived(const IPC::Message& msg) {
252 bool handled = true;
252 IPC_BEGIN_MESSAGE_MAP(PPB_URLLoader_Proxy, msg) 253 IPC_BEGIN_MESSAGE_MAP(PPB_URLLoader_Proxy, msg)
253 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Create, 254 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Create,
254 OnMsgCreate) 255 OnMsgCreate)
255 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Open, 256 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Open,
256 OnMsgOpen) 257 OnMsgOpen)
257 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_FollowRedirect, 258 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_FollowRedirect,
258 OnMsgFollowRedirect) 259 OnMsgFollowRedirect)
259 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_GetResponseInfo, 260 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_GetResponseInfo,
260 OnMsgGetResponseInfo) 261 OnMsgGetResponseInfo)
261 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_ReadResponseBody, 262 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_ReadResponseBody,
262 OnMsgReadResponseBody) 263 OnMsgReadResponseBody)
263 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_FinishStreamingToFile, 264 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_FinishStreamingToFile,
264 OnMsgFinishStreamingToFile) 265 OnMsgFinishStreamingToFile)
265 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Close, 266 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Close,
266 OnMsgClose) 267 OnMsgClose)
267 268
268 IPC_MESSAGE_HANDLER(PpapiMsg_PPBURLLoader_UpdateProgress, 269 IPC_MESSAGE_HANDLER(PpapiMsg_PPBURLLoader_UpdateProgress,
269 OnMsgUpdateProgress) 270 OnMsgUpdateProgress)
270 IPC_MESSAGE_HANDLER(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack, 271 IPC_MESSAGE_HANDLER(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack,
271 OnMsgReadResponseBodyAck) 272 OnMsgReadResponseBodyAck)
273 IPC_MESSAGE_UNHANDLED(handled = false)
272 IPC_END_MESSAGE_MAP() 274 IPC_END_MESSAGE_MAP()
273 // TODO(brettw) handle bad messages! 275 // TODO(brettw) handle bad messages!
276 return handled;
274 } 277 }
275 278
276 void PPB_URLLoader_Proxy::OnMsgCreate(PP_Instance instance, 279 void PPB_URLLoader_Proxy::OnMsgCreate(PP_Instance instance,
277 PP_Resource* result) { 280 PP_Resource* result) {
278 *result = ppb_url_loader_target()->Create(instance); 281 *result = ppb_url_loader_target()->Create(instance);
279 } 282 }
280 283
281 void PPB_URLLoader_Proxy::OnMsgOpen(PP_Resource loader, 284 void PPB_URLLoader_Proxy::OnMsgOpen(PP_Resource loader,
282 PP_Resource request_info, 285 PP_Resource request_info,
283 uint32_t serialized_callback) { 286 uint32_t serialized_callback) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 423 }
421 424
422 const void* PPB_URLLoaderTrusted_Proxy::GetSourceInterface() const { 425 const void* PPB_URLLoaderTrusted_Proxy::GetSourceInterface() const {
423 return &ppb_urlloader_trusted; 426 return &ppb_urlloader_trusted;
424 } 427 }
425 428
426 InterfaceID PPB_URLLoaderTrusted_Proxy::GetInterfaceId() const { 429 InterfaceID PPB_URLLoaderTrusted_Proxy::GetInterfaceId() const {
427 return INTERFACE_ID_PPB_URL_LOADER_TRUSTED; 430 return INTERFACE_ID_PPB_URL_LOADER_TRUSTED;
428 } 431 }
429 432
430 void PPB_URLLoaderTrusted_Proxy::OnMessageReceived(const IPC::Message& msg) { 433 bool PPB_URLLoaderTrusted_Proxy::OnMessageReceived(const IPC::Message& msg) {
434 bool handled = true;
431 IPC_BEGIN_MESSAGE_MAP(PPB_URLLoaderTrusted_Proxy, msg) 435 IPC_BEGIN_MESSAGE_MAP(PPB_URLLoaderTrusted_Proxy, msg)
432 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoaderTrusted_GrantUniversalAccess, 436 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoaderTrusted_GrantUniversalAccess,
433 OnMsgGrantUniversalAccess) 437 OnMsgGrantUniversalAccess)
438 IPC_MESSAGE_UNHANDLED(handled = false)
434 IPC_END_MESSAGE_MAP(); 439 IPC_END_MESSAGE_MAP();
435 // TODO(brettw) handle bad messages! 440 // TODO(brettw) handle bad messages!
441 return handled;
436 } 442 }
437 443
438 void PPB_URLLoaderTrusted_Proxy::OnMsgGrantUniversalAccess(PP_Resource loader) { 444 void PPB_URLLoaderTrusted_Proxy::OnMsgGrantUniversalAccess(PP_Resource loader) {
439 ppb_url_loader_trusted_target()->GrantUniversalAccess(loader); 445 ppb_url_loader_trusted_target()->GrantUniversalAccess(loader);
440 } 446 }
441 447
442 } // namespace proxy 448 } // namespace proxy
443 } // namespace pp 449 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_url_loader_proxy.h ('k') | ppapi/proxy/ppb_url_request_info_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698