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

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

Issue 6341015: Fix some bugs with incorrect ! (both missing and extra) in the proxy error ha... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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/ppb_audio_config_proxy.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) 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/dev/pp_file_info_dev.h" 9 #include "ppapi/c/dev/pp_file_info_dev.h"
10 #include "ppapi/c/pp_resource.h" 10 #include "ppapi/c/pp_resource.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 // static 175 // static
176 bool ParamTraits<PP_Size>::Read(const Message* m, void** iter, param_type* r) { 176 bool ParamTraits<PP_Size>::Read(const Message* m, void** iter, param_type* r) {
177 return m->ReadInt(iter, &r->width) && m->ReadInt(iter, &r->height); 177 return m->ReadInt(iter, &r->width) && m->ReadInt(iter, &r->height);
178 } 178 }
179 179
180 // static 180 // static
181 void ParamTraits<PP_Size>::Log(const param_type& p, std::string* l) { 181 void ParamTraits<PP_Size>::Log(const param_type& p, std::string* l) {
182 } 182 }
183 183
184 // PPBAudio_NotifyAudioStreamCreated_Params ------------------------------------
185
186 // static
187 void ParamTraits<pp::proxy::PPBAudio_NotifyAudioStreamCreated_Params>::Write(
188 Message* m,
189 const param_type& p) {
190 ParamTraits<pp::proxy::HostResource>::Write(m, p.audio_id);
191 ParamTraits<int32_t>::Write(m, p.result_code);
192 ParamTraits<PlatformFileForTransit>::Write(m, p.socket_handle);
193 ParamTraits<int32_t>::Write(m, p.length);
194 }
195
196 // static
197 bool ParamTraits<pp::proxy::PPBAudio_NotifyAudioStreamCreated_Params>::Read(
198 const Message* m,
199 void** iter,
200 param_type* r) {
201 return
202 ParamTraits<pp::proxy::HostResource>::Read(m, iter, &r->audio_id) &&
203 ParamTraits<int32_t>::Read(m, iter, &r->result_code) &&
204 ParamTraits<PlatformFileForTransit>::Read(m, iter, &r->socket_handle) &&
205 ParamTraits<int32_t>::Read(m, iter, &r->length);
206 }
207
208 // static
209 void ParamTraits<pp::proxy::PPBAudio_NotifyAudioStreamCreated_Params>::Log(
210 const param_type& p,
211 std::string* l) {
212 }
213
214 // PPBFlash_DrawGlyphs_Params -------------------------------------------------- 184 // PPBFlash_DrawGlyphs_Params --------------------------------------------------
215 185
216 // static 186 // static
217 void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Write( 187 void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Write(
218 Message* m, 188 Message* m,
219 const param_type& p) { 189 const param_type& p) {
220 ParamTraits<PP_Instance>::Write(m, p.instance); 190 ParamTraits<PP_Instance>::Write(m, p.instance);
221 ParamTraits<pp::proxy::HostResource>::Write(m, p.image_data); 191 ParamTraits<pp::proxy::HostResource>::Write(m, p.image_data);
222 ParamTraits<pp::proxy::SerializedFontDescription>::Write(m, p.font_desc); 192 ParamTraits<pp::proxy::SerializedFontDescription>::Write(m, p.font_desc);
223 ParamTraits<uint32_t>::Write(m, p.color); 193 ParamTraits<uint32_t>::Write(m, p.color);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 return true; 471 return true;
502 } 472 }
503 473
504 // static 474 // static
505 void ParamTraits< std::vector<pp::proxy::SerializedVar> >::Log( 475 void ParamTraits< std::vector<pp::proxy::SerializedVar> >::Log(
506 const param_type& p, 476 const param_type& p,
507 std::string* l) { 477 std::string* l) {
508 } 478 }
509 479
510 } // namespace IPC 480 } // namespace IPC
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_param_traits.h ('k') | ppapi/proxy/ppb_audio_config_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698