Skip to content

Commit

Permalink
Add GN arg to disable Alloy bootstrap (see #3681, see #3685)
Browse files Browse the repository at this point in the history
Set enable_alloy_bootstrap=false to build with Alloy bootstrap code
removed. Extension API is documented as deprecated in comments but
not compiled out with this arg.
  • Loading branch information
magreenblatt committed May 1, 2024
1 parent d666ec5 commit b5d84c2
Show file tree
Hide file tree
Showing 96 changed files with 1,242 additions and 515 deletions.
230 changes: 120 additions & 110 deletions BUILD.gn

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions include/base/cef_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "build/build_config.h"

#include "cef/libcef/features/features.h"

#if !BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
#define DISABLE_ALLOY_BOOTSTRAP 1
#endif

#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be
Expand Down
6 changes: 5 additions & 1 deletion include/capi/cef_browser_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=7733ed87ade32dfd311c24c51263d20b9b469868$
// $hash=6ee74f31d37a1b5ab3c9c5ccbe2dce9841329b38$
//

#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
Expand Down Expand Up @@ -911,6 +911,8 @@ typedef struct _cef_browser_host_t {
/// Returns the extension hosted in this browser or NULL if no extension is
/// hosted. See cef_request_context_t::LoadExtension for details.
///
/// WARNING: This function is deprecated and will be removed in ~M127.
///
struct _cef_extension_t*(CEF_CALLBACK* get_extension)(
struct _cef_browser_host_t* self);

Expand All @@ -919,6 +921,8 @@ typedef struct _cef_browser_host_t {
/// script. Background hosts do not have a window and are not displayable. See
/// cef_request_context_t::LoadExtension for details.
///
/// WARNING: This function is deprecated and will be removed in ~M127.
///
int(CEF_CALLBACK* is_background_host)(struct _cef_browser_host_t* self);

///
Expand Down
4 changes: 3 additions & 1 deletion include/capi/cef_extension_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0ca2b788f70f8c9f5b2706d691d8e063be00ed19$
// $hash=634054ad25154c30fb4ec630fe7fb79b0cf1f9b3$
//

#ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_
Expand All @@ -54,6 +54,8 @@ struct _cef_request_context_t;
/// Object representing an extension. Methods may be called on any thread unless
/// otherwise indicated.
///
/// WARNING: This API is deprecated and will be removed in ~M127.
///
typedef struct _cef_extension_t {
///
/// Base structure.
Expand Down
4 changes: 3 additions & 1 deletion include/capi/cef_extension_handler_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=5cfff4465a586d2b2ea7b54a9549096faec415f6$
// $hash=ebac34c9b85de780ce7524211c5dd61a80d4576c$
//

#ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_
Expand Down Expand Up @@ -80,6 +80,8 @@ typedef struct _cef_get_extension_resource_callback_t {
/// cef_request_context_t::LoadExtension for information about extension
/// loading.
///
/// WARNING: This API is deprecated and will be removed in ~M127.
///
typedef struct _cef_extension_handler_t {
///
/// Base structure.
Expand Down
12 changes: 11 additions & 1 deletion include/capi/cef_request_context_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=7df03921b2ee743fb059f13e545ccf89904eb060$
// $hash=2c496139ca9a59303b1493ee93d2c3ae96a956c0$
//

#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
Expand Down Expand Up @@ -253,6 +253,8 @@ typedef struct _cef_request_context_t {
/// See https://developer.chrome.com/extensions for extension implementation
/// and usage documentation.
///
/// WARNING: This function is deprecated and will be removed in ~M127.
///
void(CEF_CALLBACK* load_extension)(struct _cef_request_context_t* self,
const cef_string_t* root_directory,
struct _cef_dictionary_value_t* manifest,
Expand All @@ -264,6 +266,8 @@ typedef struct _cef_request_context_t {
/// access to the extension (see HasExtension). This function must be called
/// on the browser process UI thread.
///
/// WARNING: This function is deprecated and will be removed in ~M127.
///
int(CEF_CALLBACK* did_load_extension)(struct _cef_request_context_t* self,
const cef_string_t* extension_id);

Expand All @@ -273,6 +277,8 @@ typedef struct _cef_request_context_t {
/// extension (see DidLoadExtension). This function must be called on the
/// browser process UI thread.
///
/// WARNING: This function is deprecated and will be removed in ~M127.
///
int(CEF_CALLBACK* has_extension)(struct _cef_request_context_t* self,
const cef_string_t* extension_id);

Expand All @@ -282,6 +288,8 @@ typedef struct _cef_request_context_t {
/// extension ID values. Returns true (1) on success. This function must be
/// called on the browser process UI thread.
///
/// WARNING: This function is deprecated and will be removed in ~M127.
///
int(CEF_CALLBACK* get_extensions)(struct _cef_request_context_t* self,
cef_string_list_t extension_ids);

Expand All @@ -290,6 +298,8 @@ typedef struct _cef_request_context_t {
/// extension is accessible in this context (see HasExtension). This function
/// must be called on the browser process UI thread.
///
/// WARNING: This function is deprecated and will be removed in ~M127.
///
struct _cef_extension_t*(CEF_CALLBACK* get_extension)(
struct _cef_request_context_t* self,
const cef_string_t* extension_id);
Expand Down
8 changes: 4 additions & 4 deletions include/cef_api_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "73e8743408bfeba0df3b567bfd04b2eb642df11d"
#define CEF_API_HASH_UNIVERSAL "c9171db05e2e3ad611ea09d9457edaaa336bd4d6"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "3a73f4c69062c6f413e00c1821f6e6df91a2a787"
#define CEF_API_HASH_PLATFORM "d65aa12068be307fd8e6642024cb67d82643d412"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "f5fb92747082f06a9c42724b0b717accc29e3879"
#define CEF_API_HASH_PLATFORM "41e80b4bf45ce56cea0e87e825f9e6b58977a1da"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "8775d620c6b17725bddba2c1c3a21353b4d8acb1"
#define CEF_API_HASH_PLATFORM "1ed8d88d0d7d9d8a3b0296e9f84fea7752fdff2e"
#endif

#ifdef __cplusplus
Expand Down
4 changes: 4 additions & 0 deletions include/cef_browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,8 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
/// Returns the extension hosted in this browser or NULL if no extension is
/// hosted. See CefRequestContext::LoadExtension for details.
///
/// WARNING: This method is deprecated and will be removed in ~M127.
///
/*--cef()--*/
virtual CefRefPtr<CefExtension> GetExtension() = 0;

Expand All @@ -950,6 +952,8 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
/// Background hosts do not have a window and are not displayable. See
/// CefRequestContext::LoadExtension for details.
///
/// WARNING: This method is deprecated and will be removed in ~M127.
///
/*--cef()--*/
virtual bool IsBackgroundHost() = 0;

Expand Down
2 changes: 2 additions & 0 deletions include/cef_extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class CefRequestContext;
/// Object representing an extension. Methods may be called on any thread unless
/// otherwise indicated.
///
/// WARNING: This API is deprecated and will be removed in ~M127.
///
/*--cef(source=library)--*/
class CefExtension : public CefBaseRefCounted {
public:
Expand Down
2 changes: 2 additions & 0 deletions include/cef_extension_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class CefGetExtensionResourceCallback : public CefBaseRefCounted {
/// The methods of this class will be called on the UI thread. See
/// CefRequestContext::LoadExtension for information about extension loading.
///
/// WARNING: This API is deprecated and will be removed in ~M127.
///
/*--cef(source=client)--*/
class CefExtensionHandler : public virtual CefBaseRefCounted {
public:
Expand Down
10 changes: 10 additions & 0 deletions include/cef_request_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ class CefRequestContext : public CefPreferenceManager {
/// See https://developer.chrome.com/extensions for extension implementation
/// and usage documentation.
///
/// WARNING: This method is deprecated and will be removed in ~M127.
///
/*--cef(optional_param=manifest,optional_param=handler)--*/
virtual void LoadExtension(const CefString& root_directory,
CefRefPtr<CefDictionaryValue> manifest,
Expand All @@ -277,6 +279,8 @@ class CefRequestContext : public CefPreferenceManager {
/// access to the extension (see HasExtension). This method must be called on
/// the browser process UI thread.
///
/// WARNING: This method is deprecated and will be removed in ~M127.
///
/*--cef()--*/
virtual bool DidLoadExtension(const CefString& extension_id) = 0;

Expand All @@ -286,6 +290,8 @@ class CefRequestContext : public CefPreferenceManager {
/// extension (see DidLoadExtension). This method must be called on the
/// browser process UI thread.
///
/// WARNING: This method is deprecated and will be removed in ~M127.
///
/*--cef()--*/
virtual bool HasExtension(const CefString& extension_id) = 0;

Expand All @@ -295,6 +301,8 @@ class CefRequestContext : public CefPreferenceManager {
/// extension ID values. Returns true on success. This method must be called
/// on the browser process UI thread.
///
/// WARNING: This method is deprecated and will be removed in ~M127.
///
/*--cef()--*/
virtual bool GetExtensions(std::vector<CefString>& extension_ids) = 0;

Expand All @@ -303,6 +311,8 @@ class CefRequestContext : public CefPreferenceManager {
/// extension is accessible in this context (see HasExtension). This method
/// must be called on the browser process UI thread.
///
/// WARNING: This method is deprecated and will be removed in ~M127.
///
/*--cef()--*/
virtual CefRefPtr<CefExtension> GetExtension(
const CefString& extension_id) = 0;
Expand Down
2 changes: 2 additions & 0 deletions include/internal/cef_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,14 @@ typedef struct _cef_settings_t {
///
cef_string_t main_bundle_path;

#if !defined(DISABLE_ALLOY_BOOTSTRAP)
///
/// Set to true (1) to enable use of the Chrome runtime in CEF. This feature
/// is considered experimental and is not recommended for most users at this
/// time. See issue #2969 for details.
///
int chrome_runtime;
#endif

///
/// Set to true (1) to have the browser process message loop run in a separate
Expand Down
2 changes: 2 additions & 0 deletions include/internal/cef_types_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ struct CefSettingsTraits {
&target->framework_dir_path, copy);
cef_string_set(src->main_bundle_path.str, src->main_bundle_path.length,
&target->main_bundle_path, copy);
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
target->chrome_runtime = src->chrome_runtime;
#endif
target->multi_threaded_message_loop = src->multi_threaded_message_loop;
target->external_message_pump = src->external_message_pump;
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
Expand Down
Loading

0 comments on commit b5d84c2

Please sign in to comment.