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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
404 for (size_t i = 0; i < deserialized_.size(); i++) { | 404 for (size_t i = 0; i < deserialized_.size(); i++) { |
405 serialized_[i].inner_->serialization_rules()->EndReceiveCallerOwned( | 405 serialized_[i].inner_->serialization_rules()->EndReceiveCallerOwned( |
406 deserialized_[i]); | 406 deserialized_[i]); |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 PP_Var* SerializedVarVectorReceiveInput::Get(Dispatcher* dispatcher, | 410 PP_Var* SerializedVarVectorReceiveInput::Get(Dispatcher* dispatcher, |
411 uint32_t* array_size) { | 411 uint32_t* array_size) { |
412 deserialized_.resize(serialized_.size()); | 412 deserialized_.resize(serialized_.size()); |
413 for (size_t i = 0; i < serialized_.size(); i++) { | 413 for (size_t i = 0; i < serialized_.size(); i++) { |
414 // The vector must be able to clean themselves up after this call is | 414 // The vectors must be able to clean themselves up after this call is |
415 // torn down. | 415 // torn down. |
416 serialized_[i].inner_->set_serialization_rules( | 416 serialized_[i].inner_->set_serialization_rules( |
417 dispatcher->serialization_rules()); | 417 dispatcher->serialization_rules()); |
418 //serialized_[i].inner_->SetCleanupModeToEndReceiveCallerOwned(); | |
dmichael (off chromium)
2011/12/20 23:52:27
Oops, meant to delete this. Is there a reason the
| |
418 | 419 |
419 serialized_[i].inner_->SetVar( | 420 serialized_[i].inner_->SetVar( |
420 serialized_[i].inner_->serialization_rules()->BeginReceiveCallerOwned( | 421 serialized_[i].inner_->serialization_rules()->BeginReceiveCallerOwned( |
421 serialized_[i].inner_->GetIncompleteVar(), | 422 serialized_[i].inner_->GetIncompleteVar(), |
422 serialized_[i].inner_->GetStringPtr(), | 423 serialized_[i].inner_->GetStringPtr(), |
423 dispatcher)); | 424 dispatcher)); |
424 deserialized_[i] = serialized_[i].inner_->GetVar(); | 425 deserialized_[i] = serialized_[i].inner_->GetVar(); |
425 } | 426 } |
426 | 427 |
427 *array_size = static_cast<uint32_t>(serialized_.size()); | 428 *array_size = static_cast<uint32_t>(serialized_.size()); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
539 inner_->ForceSetStringValueForTest(str); | 540 inner_->ForceSetStringValueForTest(str); |
540 } | 541 } |
541 | 542 |
542 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) | 543 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) |
543 : SerializedVar(var) { | 544 : SerializedVar(var) { |
544 } | 545 } |
545 | 546 |
546 } // namespace proxy | 547 } // namespace proxy |
547 } // namespace ppapi | 548 } // namespace ppapi |
548 | 549 |
OLD | NEW |