OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |