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 | 418 |
419 serialized_[i].inner_->SetVar( | 419 serialized_[i].inner_->SetVar( |
420 serialized_[i].inner_->serialization_rules()->BeginReceiveCallerOwned( | 420 serialized_[i].inner_->serialization_rules()->BeginReceiveCallerOwned( |
421 serialized_[i].inner_->GetIncompleteVar(), | 421 serialized_[i].inner_->GetIncompleteVar(), |
422 serialized_[i].inner_->GetStringPtr(), | 422 serialized_[i].inner_->GetStringPtr(), |
423 dispatcher)); | 423 dispatcher)); |
424 deserialized_[i] = serialized_[i].inner_->GetVar(); | 424 deserialized_[i] = serialized_[i].inner_->GetVar(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 inner_->ForceSetStringValueForTest(str); | 539 inner_->ForceSetStringValueForTest(str); |
540 } | 540 } |
541 | 541 |
542 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) | 542 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) |
543 : SerializedVar(var) { | 543 : SerializedVar(var) { |
544 } | 544 } |
545 | 545 |
546 } // namespace proxy | 546 } // namespace proxy |
547 } // namespace ppapi | 547 } // namespace ppapi |
548 | 548 |
OLD | NEW |