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 #ifndef PPAPI_PROXY_SERIALIZED_VAR_H_ | 5 #ifndef PPAPI_PROXY_SERIALIZED_VAR_H_ |
6 #define PPAPI_PROXY_SERIALIZED_VAR_H_ | 6 #define PPAPI_PROXY_SERIALIZED_VAR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "ppapi/c/pp_var.h" | 13 #include "ppapi/c/pp_var.h" |
14 | 14 |
15 namespace IPC { | 15 namespace IPC { |
16 class Message; | 16 class Message; |
17 } | 17 } |
18 | 18 |
19 namespace pp { | 19 namespace ppapi { |
20 namespace proxy { | 20 namespace proxy { |
21 | 21 |
22 class Dispatcher; | 22 class Dispatcher; |
23 class VarSerializationRules; | 23 class VarSerializationRules; |
24 | 24 |
25 // This class encapsulates a var so that we can serialize and deserialize it. | 25 // This class encapsulates a var so that we can serialize and deserialize it. |
26 // The problem is that for strings, serialization and deserialization requires | 26 // The problem is that for strings, serialization and deserialization requires |
27 // knowledge from outside about how to get at or create a string. So this | 27 // knowledge from outside about how to get at or create a string. So this |
28 // object groups the var with a dispatcher so that string values can be set or | 28 // object groups the var with a dispatcher so that string values can be set or |
29 // gotten. | 29 // gotten. |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 448 |
449 // The "incomplete" var is the one sent over the wire. Strings and object | 449 // The "incomplete" var is the one sent over the wire. Strings and object |
450 // IDs have not yet been converted, so this is the thing that tests will | 450 // IDs have not yet been converted, so this is the thing that tests will |
451 // actually want to check. | 451 // actually want to check. |
452 PP_Var GetIncompleteVar() const { return inner_->GetIncompleteVar(); } | 452 PP_Var GetIncompleteVar() const { return inner_->GetIncompleteVar(); } |
453 | 453 |
454 const std::string& GetString() const { return inner_->GetString(); } | 454 const std::string& GetString() const { return inner_->GetString(); } |
455 }; | 455 }; |
456 | 456 |
457 } // namespace proxy | 457 } // namespace proxy |
458 } // namespace pp | 458 } // namespace ppapi |
459 | 459 |
460 #endif // PPAPI_PROXY_SERIALIZED_VAR_H_ | 460 #endif // PPAPI_PROXY_SERIALIZED_VAR_H_ |
461 | 461 |
OLD | NEW |