| 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 typedef struct _pp_Var PP_Var; | 8 typedef struct _pp_Var PP_Var; | 
| 9 typedef struct _ppb_Var PPB_Var; | 9 typedef struct _ppb_Var PPB_Var; | 
| 10 typedef struct NPObject NPObject; | 10 typedef struct NPObject NPObject; | 
| 11 typedef struct _NPVariant NPVariant; | 11 typedef struct _NPVariant NPVariant; | 
| 12 typedef void* NPIdentifier; | 12 typedef void* NPIdentifier; | 
| 13 | 13 | 
| 14 namespace pepper { | 14 namespace pepper { | 
| 15 | 15 | 
|  | 16 class String; | 
|  | 17 | 
| 16 // There's no class implementing Var since it could represent a number of | 18 // There's no class implementing Var since it could represent a number of | 
| 17 // objects. Instead, we just expose a getter for the interface implemented in | 19 // objects. Instead, we just expose a getter for the interface implemented in | 
| 18 // the .cc file here. | 20 // the .cc file here. | 
| 19 const PPB_Var* GetVarInterface(); | 21 const PPB_Var* GetVarInterface(); | 
| 20 | 22 | 
| 21 // Returns a PP_Var of type object that wraps the given NPObject.  Calling this | 23 // Returns a PP_Var of type object that wraps the given NPObject.  Calling this | 
| 22 // function multiple times given the same NPObject results in the same PP_Var. | 24 // function multiple times given the same NPObject results in the same PP_Var. | 
| 23 PP_Var NPObjectToPPVar(NPObject* object); | 25 PP_Var NPObjectToPPVar(NPObject* object); | 
| 24 | 26 | 
| 25 // Returns the NPObject corresponding to the PP_Var.  This pointer has not been | 27 // Returns the NPObject corresponding to the PP_Var.  This pointer has not been | 
| 26 // retained, so you should not call WebBindings::releaseObject unless you first | 28 // retained, so you should not call WebBindings::releaseObject unless you first | 
| 27 // call WebBindings::retainObject. | 29 // call WebBindings::retainObject.  Returns NULL if the PP_Var is not an object | 
|  | 30 // type. | 
| 28 NPObject* GetNPObject(PP_Var var); | 31 NPObject* GetNPObject(PP_Var var); | 
| 29 | 32 | 
|  | 33 // Returns the String corresponding to the PP_Var.  This pointer has not been | 
|  | 34 // AddRef'd, so you should not call Release!  Returns NULL if the PP_Var is not | 
|  | 35 // a string type. | 
|  | 36 String* GetString(PP_Var var); | 
|  | 37 | 
| 30 }  // namespace pepper | 38 }  // namespace pepper | 
| 31 | 39 | 
| 32 #endif  // WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ | 40 #endif  // WEBKIT_GLUE_PLUGINS_PEPPER_VAR_H_ | 
| OLD | NEW | 
|---|