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

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

Issue 8502030: Draft of a PPAPI interface for ArrayBuffer and typed arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years 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/ppapi_sources.gypi ('k') | webkit/plugins/ppapi/message_channel.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/serialized_var.h" 5 #include "ppapi/proxy/serialized_var.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ipc/ipc_message_utils.h" 8 #include "ipc/ipc_message_utils.h"
9 #include "ppapi/proxy/dispatcher.h" 9 #include "ppapi/proxy/dispatcher.h"
10 #include "ppapi/proxy/interface_proxy.h" 10 #include "ppapi/proxy/interface_proxy.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // generated there. Then the function implementing the interface can 150 // generated there. Then the function implementing the interface can
151 // handle the invalid string as if it was in process rather than seeing 151 // handle the invalid string as if it was in process rather than seeing
152 // what looks like a valid empty string. 152 // what looks like a valid empty string.
153 m->WriteString(string_value_); 153 m->WriteString(string_value_);
154 break; 154 break;
155 case PP_VARTYPE_OBJECT: 155 case PP_VARTYPE_OBJECT:
156 m->WriteInt64(var_.value.as_id); 156 m->WriteInt64(var_.value.as_id);
157 break; 157 break;
158 case PP_VARTYPE_ARRAY: 158 case PP_VARTYPE_ARRAY:
159 case PP_VARTYPE_DICTIONARY: 159 case PP_VARTYPE_DICTIONARY:
160 case PP_VARTYPE_ARRAY_BUFFER:
160 // TODO(brettw) when these are supported, implement this. 161 // TODO(brettw) when these are supported, implement this.
161 NOTIMPLEMENTED(); 162 NOTIMPLEMENTED();
162 break; 163 break;
163 } 164 }
164 } 165 }
165 166
166 bool SerializedVar::Inner::ReadFromMessage(const IPC::Message* m, void** iter) { 167 bool SerializedVar::Inner::ReadFromMessage(const IPC::Message* m, void** iter) {
167 #ifndef NDEBUG 168 #ifndef NDEBUG
168 // We should only deserialize something once or will end up with leaked 169 // We should only deserialize something once or will end up with leaked
169 // references. 170 // references.
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 inner_->ForceSetStringValueForTest(str); 536 inner_->ForceSetStringValueForTest(str);
536 } 537 }
537 538
538 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) 539 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var)
539 : SerializedVar(var) { 540 : SerializedVar(var) {
540 } 541 }
541 542
542 } // namespace proxy 543 } // namespace proxy
543 } // namespace ppapi 544 } // namespace ppapi
544 545
OLDNEW
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | webkit/plugins/ppapi/message_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698