mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Return decompressed values from CefResourceBundle (fixes issue #2976)
This commit is contained in:
committed by
Marshall Greenblatt
parent
ca1c00f95d
commit
034bd641de
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=b9577b495df3990284d4e4a3db2824196175dc91$
|
||||
// $hash=b0e2b63b467c6d4e990405d948908da3546ea1c7$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
|
||||
@@ -41,6 +41,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -70,34 +71,25 @@ typedef struct _cef_resource_bundle_t {
|
||||
int string_id);
|
||||
|
||||
///
|
||||
// Retrieves the contents of the specified scale independent |resource_id|. If
|
||||
// the value is found then |data| and |data_size| will be populated and this
|
||||
// function will return true (1). If the value is not found then this function
|
||||
// will return false (0). The returned |data| pointer will remain resident in
|
||||
// memory and should not be freed. Include cef_pack_resources.h for a listing
|
||||
// of valid resource ID values.
|
||||
// Returns a cef_binary_value_t 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.
|
||||
///
|
||||
int(CEF_CALLBACK* get_data_resource)(struct _cef_resource_bundle_t* self,
|
||||
int resource_id,
|
||||
void** data,
|
||||
size_t* data_size);
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* get_data_resource)(
|
||||
struct _cef_resource_bundle_t* self,
|
||||
int resource_id);
|
||||
|
||||
///
|
||||
// Retrieves the contents of the specified |resource_id| nearest the scale
|
||||
// factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for
|
||||
// scale independent resources or call GetDataResource instead. If the value
|
||||
// is found then |data| and |data_size| will be populated and this function
|
||||
// will return true (1). If the value is not found then this function will
|
||||
// return false (0). The returned |data| pointer will remain resident in
|
||||
// memory and should not be freed. Include cef_pack_resources.h for a listing
|
||||
// of valid resource ID values.
|
||||
// Returns a cef_binary_value_t 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.
|
||||
///
|
||||
int(CEF_CALLBACK* get_data_resource_for_scale)(
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* get_data_resource_for_scale)(
|
||||
struct _cef_resource_bundle_t* self,
|
||||
int resource_id,
|
||||
cef_scale_factor_t scale_factor,
|
||||
void** data,
|
||||
size_t* data_size);
|
||||
cef_scale_factor_t scale_factor);
|
||||
} cef_resource_bundle_t;
|
||||
|
||||
///
|
||||
|
Reference in New Issue
Block a user