Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/raw_var_data.h" | 5 #include "ppapi/proxy/raw_var_data.h" |
| 6 | 6 |
| 7 #include <stack> | 7 #include <stack> |
| 8 | 8 |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 233 case PP_VARTYPE_OBJECT: | 233 case PP_VARTYPE_OBJECT: |
| 234 return new BasicRawVarData(); | 234 return new BasicRawVarData(); |
| 235 case PP_VARTYPE_STRING: | 235 case PP_VARTYPE_STRING: |
| 236 return new StringRawVarData(); | 236 return new StringRawVarData(); |
| 237 case PP_VARTYPE_ARRAY_BUFFER: | 237 case PP_VARTYPE_ARRAY_BUFFER: |
| 238 return new ArrayBufferRawVarData(); | 238 return new ArrayBufferRawVarData(); |
| 239 case PP_VARTYPE_ARRAY: | 239 case PP_VARTYPE_ARRAY: |
| 240 return new ArrayRawVarData(); | 240 return new ArrayRawVarData(); |
| 241 case PP_VARTYPE_DICTIONARY: | 241 case PP_VARTYPE_DICTIONARY: |
| 242 return new DictionaryRawVarData(); | 242 return new DictionaryRawVarData(); |
| 243 case PP_VARTYPE_RESOURCE: | |
| 244 // TODO(mgiuca): Add ResourceRawVarData. (http://crbug.com/177017) | |
| 245 // This path will be reached if a NaCl module attempts to pass a | |
| 246 // PP_VARTYPE_RESOURCE in a message. | |
| 247 NOTIMPLEMENTED(); | |
| 248 CHECK(false) << "Serializing PP_VARTYPE_RESOURCE is not supported."; | |
|
raymes
2013/09/11 22:52:29
I realise that you are going to be changing this s
Matt Giuca
2013/09/12 07:08:24
OK, fair enough.
That will result in a NULL point
| |
| 249 return NULL; | |
| 243 } | 250 } |
| 244 NOTREACHED(); | 251 NOTREACHED(); |
| 245 return NULL; | 252 return NULL; |
| 246 } | 253 } |
| 247 | 254 |
| 248 RawVarData::RawVarData() : initialized_(false) { | 255 RawVarData::RawVarData() : initialized_(false) { |
| 249 } | 256 } |
| 250 | 257 |
| 251 RawVarData::~RawVarData() { | 258 RawVarData::~RawVarData() { |
| 252 } | 259 } |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 656 return false; | 663 return false; |
| 657 if (!m->ReadUInt32(iter, &value)) | 664 if (!m->ReadUInt32(iter, &value)) |
| 658 return false; | 665 return false; |
| 659 children_.push_back(make_pair(key, value)); | 666 children_.push_back(make_pair(key, value)); |
| 660 } | 667 } |
| 661 return true; | 668 return true; |
| 662 } | 669 } |
| 663 | 670 |
| 664 } // namespace proxy | 671 } // namespace proxy |
| 665 } // namespace ppapi | 672 } // namespace ppapi |
| OLD | NEW |