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

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

Issue 7706021: Convert FileRefImpl and URLRequestInfo to shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fixes Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ppapi_param_traits.h" 5 #include "ppapi/proxy/ppapi_param_traits.h"
6 6
7 #include <string.h> // For memcpy 7 #include <string.h> // For memcpy
8 8
9 #include "ppapi/c/pp_file_info.h" 9 #include "ppapi/c/pp_file_info.h"
10 #include "ppapi/c/pp_resource.h" 10 #include "ppapi/c/pp_resource.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 ParamTraits<std::vector<PP_Point> >::Read(m, iter, &r->glyph_advances) && 241 ParamTraits<std::vector<PP_Point> >::Read(m, iter, &r->glyph_advances) &&
242 r->glyph_indices.size() == r->glyph_advances.size(); 242 r->glyph_indices.size() == r->glyph_advances.size();
243 } 243 }
244 244
245 // static 245 // static
246 void ParamTraits<ppapi::proxy::PPBFlash_DrawGlyphs_Params>::Log( 246 void ParamTraits<ppapi::proxy::PPBFlash_DrawGlyphs_Params>::Log(
247 const param_type& p, 247 const param_type& p,
248 std::string* l) { 248 std::string* l) {
249 } 249 }
250 250
251 // PPBFileRef_CreateInfo ------------------------------------------------------- 251 // PPB_FileRef_CreateInfo ------------------------------------------------------
252 252
253 // static 253 // static
254 void ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo>::Write( 254 void ParamTraits<ppapi::PPB_FileRef_CreateInfo>::Write(Message* m,
255 Message* m, 255 const param_type& p) {
256 const param_type& p) {
257 ParamTraits<ppapi::HostResource>::Write(m, p.resource); 256 ParamTraits<ppapi::HostResource>::Write(m, p.resource);
258 ParamTraits<int>::Write(m, p.file_system_type); 257 ParamTraits<int>::Write(m, p.file_system_type);
259 ParamTraits<ppapi::proxy::SerializedVar>::Write(m, p.path); 258 ParamTraits<std::string>::Write(m, p.path);
260 ParamTraits<ppapi::proxy::SerializedVar>::Write(m, p.name); 259 ParamTraits<std::string>::Write(m, p.name);
261 } 260 }
262 261
263 // static 262 // static
264 bool ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo>::Read(const Message* m, 263 bool ParamTraits<ppapi::PPB_FileRef_CreateInfo>::Read(const Message* m,
265 void** iter, 264 void** iter,
266 param_type* r) { 265 param_type* r) {
267 return 266 return
268 ParamTraits<ppapi::HostResource>::Read(m, iter, &r->resource) && 267 ParamTraits<ppapi::HostResource>::Read(m, iter, &r->resource) &&
269 ParamTraits<int>::Read(m, iter, &r->file_system_type) && 268 ParamTraits<int>::Read(m, iter, &r->file_system_type) &&
270 ParamTraits<ppapi::proxy::SerializedVar>::Read(m, iter, &r->path) && 269 ParamTraits<std::string>::Read(m, iter, &r->path) &&
271 ParamTraits<ppapi::proxy::SerializedVar>::Read(m, iter, &r->name); 270 ParamTraits<std::string>::Read(m, iter, &r->name);
272 } 271 }
273 272
274 // static 273 // static
275 void ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo>::Log( 274 void ParamTraits<ppapi::PPB_FileRef_CreateInfo>::Log(const param_type& p,
276 const param_type& p, 275 std::string* l) {
277 std::string* l) {
278 } 276 }
279 277
280 // PPBURLLoader_UpdateProgress_Params ------------------------------------------ 278 // PPBURLLoader_UpdateProgress_Params ------------------------------------------
281 279
282 // static 280 // static
283 void ParamTraits<ppapi::proxy::PPBURLLoader_UpdateProgress_Params>::Write( 281 void ParamTraits<ppapi::proxy::PPBURLLoader_UpdateProgress_Params>::Write(
284 Message* m, 282 Message* m,
285 const param_type& p) { 283 const param_type& p) {
286 ParamTraits<PP_Instance>::Write(m, p.instance); 284 ParamTraits<PP_Instance>::Write(m, p.instance);
287 ParamTraits<ppapi::HostResource>::Write(m, p.resource); 285 ParamTraits<ppapi::HostResource>::Write(m, p.resource);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 param_type* r) { 431 param_type* r) {
434 return ReadVectorWithoutCopy(m, iter, r); 432 return ReadVectorWithoutCopy(m, iter, r);
435 } 433 }
436 434
437 // static 435 // static
438 void ParamTraits< std::vector<ppapi::proxy::SerializedVar> >::Log( 436 void ParamTraits< std::vector<ppapi::proxy::SerializedVar> >::Log(
439 const param_type& p, 437 const param_type& p,
440 std::string* l) { 438 std::string* l) {
441 } 439 }
442 440
443 // std::vector<PPBFileRef_CreateInfo> ------------------------------------------ 441 // std::vector<PPB_FileRef_CreateInfo> -----------------------------------------
444 442
445 void ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> >::Write( 443 void ParamTraits< std::vector<ppapi::PPB_FileRef_CreateInfo> >::Write(
446 Message* m, 444 Message* m,
447 const param_type& p) { 445 const param_type& p) {
448 WriteVectorWithoutCopy(m, p); 446 WriteVectorWithoutCopy(m, p);
449 } 447 }
450 448
451 // static 449 // static
452 bool ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> >::Read( 450 bool ParamTraits< std::vector<ppapi::PPB_FileRef_CreateInfo> >::Read(
453 const Message* m, 451 const Message* m,
454 void** iter, 452 void** iter,
455 param_type* r) { 453 param_type* r) {
456 return ReadVectorWithoutCopy(m, iter, r); 454 return ReadVectorWithoutCopy(m, iter, r);
457 } 455 }
458 456
459 // static 457 // static
460 void ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> >::Log( 458 void ParamTraits< std::vector<ppapi::PPB_FileRef_CreateInfo> >::Log(
461 const param_type& p, 459 const param_type& p,
462 std::string* l) { 460 std::string* l) {
463 } 461 }
464 462
465 // SerializedFlashMenu --------------------------------------------------------- 463 // SerializedFlashMenu ---------------------------------------------------------
466 464
467 // static 465 // static
468 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Write( 466 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Write(
469 Message* m, 467 Message* m,
470 const param_type& p) { 468 const param_type& p) {
471 p.WriteToMessage(m); 469 p.WriteToMessage(m);
472 } 470 }
473 471
474 // static 472 // static
475 bool ParamTraits<ppapi::proxy::SerializedFlashMenu>::Read(const Message* m, 473 bool ParamTraits<ppapi::proxy::SerializedFlashMenu>::Read(const Message* m,
476 void** iter, 474 void** iter,
477 param_type* r) { 475 param_type* r) {
478 return r->ReadFromMessage(m, iter); 476 return r->ReadFromMessage(m, iter);
479 } 477 }
480 478
481 // static 479 // static
482 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Log(const param_type& p, 480 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Log(const param_type& p,
483 std::string* l) { 481 std::string* l) {
484 } 482 }
485 483
486 } // namespace IPC 484 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698