| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 DCHECK_EQ(PP_VARTYPE_UNDEFINED, var_.type); | 243 DCHECK_EQ(PP_VARTYPE_UNDEFINED, var_.type); |
| 244 switch (raw_var_data_->type) { | 244 switch (raw_var_data_->type) { |
| 245 case PP_VARTYPE_STRING: { | 245 case PP_VARTYPE_STRING: { |
| 246 var_ = StringVar::SwapValidatedUTF8StringIntoPPVar( | 246 var_ = StringVar::SwapValidatedUTF8StringIntoPPVar( |
| 247 &raw_var_data_->data); | 247 &raw_var_data_->data); |
| 248 break; | 248 break; |
| 249 } | 249 } |
| 250 case PP_VARTYPE_ARRAY_BUFFER: { | 250 case PP_VARTYPE_ARRAY_BUFFER: { |
| 251 var_ = PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar( | 251 var_ = PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar( |
| 252 raw_var_data_->data.size(), raw_var_data_->data.data()); | 252 static_cast<uint32>(raw_var_data_->data.size()), |
| 253 raw_var_data_->data.data()); |
| 253 break; | 254 break; |
| 254 } | 255 } |
| 255 default: | 256 default: |
| 256 NOTREACHED(); | 257 NOTREACHED(); |
| 257 } | 258 } |
| 258 raw_var_data_.reset(NULL); | 259 raw_var_data_.reset(NULL); |
| 259 } | 260 } |
| 260 | 261 |
| 261 // SerializedVar --------------------------------------------------------------- | 262 // SerializedVar --------------------------------------------------------------- |
| 262 | 263 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 const std::string& str) { | 531 const std::string& str) { |
| 531 inner_->ForceSetVarValueForTest(StringVar::StringToPPVar(str)); | 532 inner_->ForceSetVarValueForTest(StringVar::StringToPPVar(str)); |
| 532 } | 533 } |
| 533 | 534 |
| 534 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) | 535 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) |
| 535 : SerializedVar(var) { | 536 : SerializedVar(var) { |
| 536 } | 537 } |
| 537 | 538 |
| 538 } // namespace proxy | 539 } // namespace proxy |
| 539 } // namespace ppapi | 540 } // namespace ppapi |
| OLD | NEW |