Overview   Project   Class   Tree   Index 
CEF C++ API Docs - Revision 439
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefV8Value

CefBase
   |
   +--CefV8Value

   in cef.h

class CefV8Value
extends CefBase

Class representing a V8 value. The methods of this class should only be called on the UI thread.


Inner Classes, Typedefs, and Enums
typedef CefV8Value::AccessControl
          
typedef CefV8Value::PropertyAttribute
          
 
Method Summary
 static CefRefPtr< CefV8Value > CreateArray()
          Create a new CefV8Value object of type array.
 static CefRefPtr< CefV8Value > CreateBool( bool value )
          Create a new CefV8Value object of type bool.
 static CefRefPtr< CefV8Value > CreateDate( const CefTime& date )
          Create a new CefV8Value object of type Date.
 static CefRefPtr< CefV8Value > CreateDouble( double value )
          Create a new CefV8Value object of type double.
 static CefRefPtr< CefV8Value > CreateFunction( const CefString& name, CefRefPtr< CefV8Handler > handler )
          Create a new CefV8Value object of type function.
 static CefRefPtr< CefV8Value > CreateInt( int value )
          Create a new CefV8Value object of type int.
 static CefRefPtr< CefV8Value > CreateNull()
          Create a new CefV8Value object of type null.
 static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefBase > user_data )
          Create a new CefV8Value object of type object.
 static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefBase > user_data, CefRefPtr< CefV8Accessor > accessor )
          Create a new CefV8Value object of type object with accessors.
 static CefRefPtr< CefV8Value > CreateString( const CefString& value )
          Create a new CefV8Value object of type string.
 static CefRefPtr< CefV8Value > CreateUndefined()
          Create a new CefV8Value object of type undefined.
 virtual bool DeleteValue( const CefString& key )= 0
          Delete the value with the specified identifier.
 virtual bool DeleteValue( int index )= 0
          Delete the value with the specified identifier.
 virtual bool ExecuteFunction( CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments, CefRefPtr< CefV8Value >& retval, CefRefPtr< CefV8Exception >& exception, bool rethrow_exception )= 0
          Execute the function using the current V8 context.
 virtual bool ExecuteFunctionWithContext( CefRefPtr< CefV8Context > context, CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments, CefRefPtr< CefV8Value >& retval, CefRefPtr< CefV8Exception >& exception, bool rethrow_exception )= 0
          Execute the function using the specified V8 context.
 virtual int GetArrayLength()= 0
          Returns the number of elements in the array.
 virtual bool GetBoolValue()= 0
          Return a bool value.
 virtual CefTime GetDateValue()= 0
          Return a Date value.
 virtual double GetDoubleValue()= 0
          Return a double value.
 virtual CefRefPtr< CefV8Handler > GetFunctionHandler()= 0
          Returns the function handler or NULL if not a CEF-created function.
 virtual CefString GetFunctionName()= 0
          Returns the function name.
 virtual int GetIntValue()= 0
          Return an int value.
 virtual bool GetKeys( std::vector< CefString >& keys )= 0
          Read the keys for the object's values into the specified vector.
 virtual CefString GetStringValue()= 0
          Return a string value.
 virtual CefRefPtr< CefBase > GetUserData()= 0
          Returns the user data, if any, specified when the object was created.
 virtual CefRefPtr< CefV8Value > GetValue( const CefString& key )= 0
          Returns the value with the specified identifier.
 virtual CefRefPtr< CefV8Value > GetValue( int index )= 0
          Returns the value with the specified identifier.
 virtual bool HasValue( int index )= 0
          Returns true if the object has a value with the specified identifier.
 virtual bool HasValue( const CefString& key )= 0
          Returns true if the object has a value with the specified identifier.
 virtual bool IsArray()= 0
          True if the value type is array.
 virtual bool IsBool()= 0
          True if the value type is bool.
 virtual bool IsDate()= 0
          True if the value type is Date.
 virtual bool IsDouble()= 0
          True if the value type is double.
 virtual bool IsFunction()= 0
          True if the value type is function.
 virtual bool IsInt()= 0
          True if the value type is int.
 virtual bool IsNull()= 0
          True if the value type is null.
 virtual bool IsObject()= 0
          True if the value type is object.
 virtual bool IsSame( CefRefPtr< CefV8Value > that )= 0
          Returns true if this object is pointing to the same handle as |that| object.
 virtual bool IsString()= 0
          True if the value type is string.
 virtual bool IsUndefined()= 0
          True if the value type is undefined.
 virtual bool SetValue( const CefString& key, CefRefPtr< CefV8Value > value, CefV8Value::PropertyAttribute attribute )= 0
          Associate a value with the specified identifier.
 virtual bool SetValue( int index, CefRefPtr< CefV8Value > value )= 0
          Associate a value with the specified identifier.
 virtual bool SetValue( const CefString& key, CefV8Value::AccessControl settings, CefV8Value::PropertyAttribute attribute )= 0
          Register an identifier whose access will be forwarded to the CefV8Accessor instance passed to CefV8Value::CreateObject().
   
Methods inherited from class CefBase
AddRef, Release, GetRefCt
 

Method Detail

CreateArray

public static CefRefPtr< CefV8Value > CreateArray();
Create a new CefV8Value object of type array. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateBool

public static CefRefPtr< CefV8Value > CreateBool( bool value );
Create a new CefV8Value object of type bool.

CreateDate

public static CefRefPtr< CefV8Value > CreateDate( const CefTime& date );
Create a new CefV8Value object of type Date.

CreateDouble

public static CefRefPtr< CefV8Value > CreateDouble( double value );
Create a new CefV8Value object of type double.

CreateFunction

public static CefRefPtr< CefV8Value > CreateFunction( const CefString& name, CefRefPtr< CefV8Handler > handler );
Create a new CefV8Value object of type function. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateInt

public static CefRefPtr< CefV8Value > CreateInt( int value );
Create a new CefV8Value object of type int.

CreateNull

public static CefRefPtr< CefV8Value > CreateNull();
Create a new CefV8Value object of type null.

CreateObject

public static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefBase > user_data );
Create a new CefV8Value object of type object. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateObject

public static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefBase > user_data, CefRefPtr< CefV8Accessor > accessor );
Create a new CefV8Value object of type object with accessors. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateString

public static CefRefPtr< CefV8Value > CreateString( const CefString& value );
Create a new CefV8Value object of type string.

CreateUndefined

public static CefRefPtr< CefV8Value > CreateUndefined();
Create a new CefV8Value object of type undefined.

DeleteValue

public virtual bool DeleteValue( const CefString& key )= 0;
Delete the value with the specified identifier.

DeleteValue

public virtual bool DeleteValue( int index )= 0;
Delete the value with the specified identifier.

ExecuteFunction

public virtual bool ExecuteFunction( CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments, CefRefPtr< CefV8Value >& retval, CefRefPtr< CefV8Exception >& exception, bool rethrow_exception )= 0;
Execute the function using the current V8 context. This method should only be called from within the scope of a CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference. |object| is the receiver ('this' object) of the function. |arguments| is the list of arguments that will be passed to the function. If execution succeeds |retval| will be set to the function return value. If execution fails |exception| will be set to the exception that was thrown. If |rethrow_exception| is true any exception will also be re- thrown. This method returns false if called incorrectly.

ExecuteFunctionWithContext

public virtual bool ExecuteFunctionWithContext( CefRefPtr< CefV8Context > context, CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments, CefRefPtr< CefV8Value >& retval, CefRefPtr< CefV8Exception >& exception, bool rethrow_exception )= 0;
Execute the function using the specified V8 context. |object| is the receiver ('this' object) of the function. |arguments| is the list of arguments that will be passed to the function. If execution succeeds |retval| will be set to the function return value. If execution fails |exception| will be set to the exception that was thrown. If |rethrow_exception| is true any exception will also be re-thrown. This method returns false if called incorrectly.

GetArrayLength

public virtual int GetArrayLength()= 0;
Returns the number of elements in the array.

GetBoolValue

public virtual bool GetBoolValue()= 0;
Return a bool value. The underlying data will be converted to if necessary.

GetDateValue

public virtual CefTime GetDateValue()= 0;
Return a Date value. The underlying data will be converted to if necessary.

GetDoubleValue

public virtual double GetDoubleValue()= 0;
Return a double value. The underlying data will be converted to if necessary.

GetFunctionHandler

public virtual CefRefPtr< CefV8Handler > GetFunctionHandler()= 0;
Returns the function handler or NULL if not a CEF-created function.

GetFunctionName

public virtual CefString GetFunctionName()= 0;
Returns the function name.

GetIntValue

public virtual int GetIntValue()= 0;
Return an int value. The underlying data will be converted to if necessary.

GetKeys

public virtual bool GetKeys( std::vector< CefString >& keys )= 0;
Read the keys for the object's values into the specified vector. Integer- based keys will also be returned as strings.

GetStringValue

public virtual CefString GetStringValue()= 0;
Return a string value. The underlying data will be converted to if necessary.

GetUserData

public virtual CefRefPtr< CefBase > GetUserData()= 0;
Returns the user data, if any, specified when the object was created.

GetValue

public virtual CefRefPtr< CefV8Value > GetValue( const CefString& key )= 0;
Returns the value with the specified identifier.

GetValue

public virtual CefRefPtr< CefV8Value > GetValue( int index )= 0;
Returns the value with the specified identifier.

HasValue

public virtual bool HasValue( int index )= 0;
Returns true if the object has a value with the specified identifier.

HasValue

public virtual bool HasValue( const CefString& key )= 0;
Returns true if the object has a value with the specified identifier.

IsArray

public virtual bool IsArray()= 0;
True if the value type is array.

IsBool

public virtual bool IsBool()= 0;
True if the value type is bool.

IsDate

public virtual bool IsDate()= 0;
True if the value type is Date.

IsDouble

public virtual bool IsDouble()= 0;
True if the value type is double.

IsFunction

public virtual bool IsFunction()= 0;
True if the value type is function.

IsInt

public virtual bool IsInt()= 0;
True if the value type is int.

IsNull

public virtual bool IsNull()= 0;
True if the value type is null.

IsObject

public virtual bool IsObject()= 0;
True if the value type is object.

IsSame

public virtual bool IsSame( CefRefPtr< CefV8Value > that )= 0;
Returns true if this object is pointing to the same handle as |that| object.

IsString

public virtual bool IsString()= 0;
True if the value type is string.

IsUndefined

public virtual bool IsUndefined()= 0;
True if the value type is undefined.

SetValue

public virtual bool SetValue( const CefString& key, CefRefPtr< CefV8Value > value, CefV8Value::PropertyAttribute attribute )= 0;
Associate a value with the specified identifier.

SetValue

public virtual bool SetValue( int index, CefRefPtr< CefV8Value > value )= 0;
Associate a value with the specified identifier.

SetValue

public virtual bool SetValue( const CefString& key, CefV8Value::AccessControl settings, CefV8Value::PropertyAttribute attribute )= 0;
Register an identifier whose access will be forwarded to the CefV8Accessor instance passed to CefV8Value::CreateObject().

 Overview   Project   Class   Tree   Index 
CEF C++ API Docs - Revision 439
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2011 Marshall A. Greenblatt