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

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

Issue 8930010: Implement in-process PPB_VarArrayBuffer_Dev. (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/proxy/proxy_object_var.cc ('k') | ppapi/shared_impl/api_id.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) 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 IPC::ParamTraits<double>::Write(m, var_.value.as_double); 145 IPC::ParamTraits<double>::Write(m, var_.value.as_double);
146 break; 146 break;
147 case PP_VARTYPE_STRING: 147 case PP_VARTYPE_STRING:
148 // TODO(brettw) in the case of an invalid string ID, it would be nice 148 // TODO(brettw) in the case of an invalid string ID, it would be nice
149 // to send something to the other side such that a 0 ID would be 149 // to send something to the other side such that a 0 ID would be
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_ARRAY_BUFFER:
156 // TODO(dmichael): Proxy ArrayBuffer.
157 NOTIMPLEMENTED();
158 break;
155 case PP_VARTYPE_OBJECT: 159 case PP_VARTYPE_OBJECT:
156 m->WriteInt64(var_.value.as_id); 160 m->WriteInt64(var_.value.as_id);
157 break; 161 break;
158 case PP_VARTYPE_ARRAY: 162 case PP_VARTYPE_ARRAY:
159 case PP_VARTYPE_DICTIONARY: 163 case PP_VARTYPE_DICTIONARY:
160 case PP_VARTYPE_ARRAY_BUFFER:
161 // TODO(brettw) when these are supported, implement this. 164 // TODO(brettw) when these are supported, implement this.
162 NOTIMPLEMENTED(); 165 NOTIMPLEMENTED();
163 break; 166 break;
164 } 167 }
165 } 168 }
166 169
167 bool SerializedVar::Inner::ReadFromMessage(const IPC::Message* m, void** iter) { 170 bool SerializedVar::Inner::ReadFromMessage(const IPC::Message* m, void** iter) {
168 #ifndef NDEBUG 171 #ifndef NDEBUG
169 // We should only deserialize something once or will end up with leaked 172 // We should only deserialize something once or will end up with leaked
170 // references. 173 // references.
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 inner_->ForceSetStringValueForTest(str); 539 inner_->ForceSetStringValueForTest(str);
537 } 540 }
538 541
539 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) 542 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var)
540 : SerializedVar(var) { 543 : SerializedVar(var) {
541 } 544 }
542 545
543 } // namespace proxy 546 } // namespace proxy
544 } // namespace ppapi 547 } // namespace ppapi
545 548
OLDNEW
« no previous file with comments | « ppapi/proxy/proxy_object_var.cc ('k') | ppapi/shared_impl/api_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698