OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 typedef struct _pp_Var PP_Var; | 10 typedef struct _pp_Var PP_Var; |
(...skipping 15 matching lines...) Expand all Loading... |
26 // function multiple times given the same NPObject results in the same PP_Var. | 26 // function multiple times given the same NPObject results in the same PP_Var. |
27 PP_Var NPObjectToPPVar(NPObject* object); | 27 PP_Var NPObjectToPPVar(NPObject* object); |
28 | 28 |
29 // Returns the NPObject corresponding to the PP_Var. This pointer has not been | 29 // Returns the NPObject corresponding to the PP_Var. This pointer has not been |
30 // retained, so you should not call WebBindings::releaseObject unless you first | 30 // retained, so you should not call WebBindings::releaseObject unless you first |
31 // call WebBindings::retainObject. Returns NULL if the PP_Var is not an object | 31 // call WebBindings::retainObject. Returns NULL if the PP_Var is not an object |
32 // type. | 32 // type. |
33 NPObject* GetNPObject(PP_Var var); | 33 NPObject* GetNPObject(PP_Var var); |
34 | 34 |
35 // Returns a PP_Var of type string that contains a copy of the given string. | 35 // Returns a PP_Var of type string that contains a copy of the given string. |
36 // The input data must be valid UTF-8 encoded text. The return value will | 36 // The input data must be valid UTF-8 encoded text. |
37 // have a reference count of 1. | |
38 PP_Var StringToPPVar(const std::string& str); | 37 PP_Var StringToPPVar(const std::string& str); |
39 | 38 |
40 // Returns the String corresponding to the PP_Var. This pointer has not been | 39 // Returns the String corresponding to the PP_Var. This pointer has not been |
41 // AddRef'd, so you should not call Release! Returns NULL if the PP_Var is not | 40 // AddRef'd, so you should not call Release! Returns NULL if the PP_Var is not |
42 // a string type. | 41 // a string type. |
43 String* GetString(PP_Var var); | 42 String* GetString(PP_Var var); |
44 | 43 |
45 } // namespace pepper | 44 } // namespace pepper |
46 | 45 |
47 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ | 46 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ |
OLD | NEW |