Chromium Embedded Framework (CEF)  126.2.0+g5c56e98+chromium-126.0.6478.62
CefResourceBundle Class Referenceabstract

Class used for retrieving resources from the resource bundle (*.pak) files loaded by CEF during startup or via the CefResourceBundleHandler returned from CefApp::GetResourceBundleHandler. More...

#include "include/cef_resource_bundle.h"

Inheritance diagram for CefResourceBundle:
CefBaseRefCounted

Public Types

typedef cef_scale_factor_t ScaleFactor
 

Public Member Functions

virtual CefString GetLocalizedString (int string_id)=0
 Returns the localized string for the specified |string_id| or an empty string if the value is not found. More...
 
virtual CefRefPtr< CefBinaryValueGetDataResource (int resource_id)=0
 Returns a CefBinaryValue containing the decompressed contents of the specified scale independent |resource_id| or NULL if not found. More...
 
virtual CefRefPtr< CefBinaryValueGetDataResourceForScale (int resource_id, ScaleFactor scale_factor)=0
 Returns a CefBinaryValue containing the decompressed contents of the specified |resource_id| nearest the scale factor |scale_factor| or NULL if not found. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefResourceBundleGetGlobal ()
 Returns the global resource bundle instance. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class used for retrieving resources from the resource bundle (*.pak) files loaded by CEF during startup or via the CefResourceBundleHandler returned from CefApp::GetResourceBundleHandler.

See CefSettings for additional options related to resource bundle loading. The methods of this class may be called on any thread unless otherwise indicated.

Member Typedef Documentation

◆ ScaleFactor

Member Function Documentation

◆ GetDataResource()

virtual CefRefPtr<CefBinaryValue> CefResourceBundle::GetDataResource ( int  resource_id)
pure virtual

Returns a CefBinaryValue containing the decompressed contents of the specified scale independent |resource_id| or NULL if not found.

Include cef_pack_resources.h for a listing of valid resource ID values.

◆ GetDataResourceForScale()

virtual CefRefPtr<CefBinaryValue> CefResourceBundle::GetDataResourceForScale ( int  resource_id,
ScaleFactor  scale_factor 
)
pure virtual

Returns a CefBinaryValue containing the decompressed contents of the specified |resource_id| nearest the scale factor |scale_factor| or NULL if not found.

Use a |scale_factor| value of SCALE_FACTOR_NONE for scale independent resources or call GetDataResource instead.Include cef_pack_resources.h for a listing of valid resource ID values.

◆ GetGlobal()

static CefRefPtr<CefResourceBundle> CefResourceBundle::GetGlobal ( )
static

Returns the global resource bundle instance.

◆ GetLocalizedString()

virtual CefString CefResourceBundle::GetLocalizedString ( int  string_id)
pure virtual

Returns the localized string for the specified |string_id| or an empty string if the value is not found.

Include cef_pack_strings.h for a listing of valid string ID values.


The documentation for this class was generated from the following file: