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

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

Issue 10984094: Hook up PpapiPermissions in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/ppapi_param_traits.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('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) 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/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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 param_type* r) { 305 param_type* r) {
306 return ReadVectorWithoutCopy(m, iter, r); 306 return ReadVectorWithoutCopy(m, iter, r);
307 } 307 }
308 308
309 // static 309 // static
310 void ParamTraits< std::vector<ppapi::PPB_FileRef_CreateInfo> >::Log( 310 void ParamTraits< std::vector<ppapi::PPB_FileRef_CreateInfo> >::Log(
311 const param_type& p, 311 const param_type& p,
312 std::string* l) { 312 std::string* l) {
313 } 313 }
314 314
315 // ppapi::PpapiPermissions -----------------------------------------------------
316
317 void ParamTraits<ppapi::PpapiPermissions>::Write(Message* m,
318 const param_type& p) {
319 ParamTraits<uint32_t>::Write(m, p.GetBits());
320 }
321
322 // static
323 bool ParamTraits<ppapi::PpapiPermissions>::Read(const Message* m,
324 PickleIterator* iter,
325 param_type* r) {
326 uint32_t bits;
327 if (!ParamTraits<uint32_t>::Read(m, iter, &bits))
328 return false;
329 *r = ppapi::PpapiPermissions(bits);
330 return true;
331 }
332
333 // static
334 void ParamTraits<ppapi::PpapiPermissions>::Log(const param_type& p,
335 std::string* l) {
336 }
337
315 // SerializedHandle ------------------------------------------------------------ 338 // SerializedHandle ------------------------------------------------------------
316 339
317 // static 340 // static
318 void ParamTraits<ppapi::proxy::SerializedHandle>::Write(Message* m, 341 void ParamTraits<ppapi::proxy::SerializedHandle>::Write(Message* m,
319 const param_type& p) { 342 const param_type& p) {
320 ppapi::proxy::SerializedHandle::WriteHeader(p.header(), m); 343 ppapi::proxy::SerializedHandle::WriteHeader(p.header(), m);
321 switch (p.type()) { 344 switch (p.type()) {
322 case ppapi::proxy::SerializedHandle::SHARED_MEMORY: 345 case ppapi::proxy::SerializedHandle::SHARED_MEMORY:
323 ParamTraits<base::SharedMemoryHandle>::Write(m, p.shmem()); 346 ParamTraits<base::SharedMemoryHandle>::Write(m, p.shmem());
324 break; 347 break;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 param_type* r) { 590 param_type* r) {
568 return ParamTraits<ListValue>::Read(m, iter, &(r->values_)); 591 return ParamTraits<ListValue>::Read(m, iter, &(r->values_));
569 } 592 }
570 593
571 // static 594 // static
572 void ParamTraits<ppapi::PPB_X509Certificate_Fields>::Log(const param_type& p, 595 void ParamTraits<ppapi::PPB_X509Certificate_Fields>::Log(const param_type& p,
573 std::string* l) { 596 std::string* l) {
574 } 597 }
575 598
576 } // namespace IPC 599 } // namespace IPC
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_param_traits.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698