Wait for CefBrowserContext initialization (see issue #2969)

With the Chrome runtime, Profile initialization may be asynchronous. Code that
waited on CefBrowserContext creation now needs to wait on CefBrowserContext
initialization instead.
This commit is contained in:
Marshall Greenblatt
2021-04-14 19:28:22 -04:00
parent fc7f9ff505
commit 34c63a665d
39 changed files with 779 additions and 477 deletions

View File

@@ -9,10 +9,11 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ae6ec27ec52df5eb0db397c27b0df4969474dc0c$
// $hash=8e7b2e3e8124ede620b8a04116656550949f89f1$
//
#include "libcef_dll/ctocpp/media_router_ctocpp.h"
#include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
#include "libcef_dll/cpptoc/media_observer_cpptoc.h"
#include "libcef_dll/cpptoc/media_route_create_callback_cpptoc.h"
#include "libcef_dll/ctocpp/media_sink_ctocpp.h"
@@ -23,13 +24,17 @@
// STATIC METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall")
CefRefPtr<CefMediaRouter> CefMediaRouter::GetGlobalMediaRouter() {
CefRefPtr<CefMediaRouter> CefMediaRouter::GetGlobalMediaRouter(
CefRefPtr<CefCompletionCallback> callback) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: callback
// Execute
cef_media_router_t* _retval = cef_media_router_get_global();
cef_media_router_t* _retval =
cef_media_router_get_global(CefCompletionCallbackCppToC::Wrap(callback));
// Return type: refptr_same
return CefMediaRouterCToCpp::Wrap(_retval);

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=fde747bf60e627912a0f242a2475af69be80f298$
// $hash=67bc021917c8f7d1e386859bbfae6e007b292f45$
//
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
@@ -527,15 +527,19 @@ CefRefPtr<CefExtension> CefRequestContextCToCpp::GetExtension(
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefMediaRouter> CefRequestContextCToCpp::GetMediaRouter() {
CefRefPtr<CefMediaRouter> CefRequestContextCToCpp::GetMediaRouter(
CefRefPtr<CefCompletionCallback> callback) {
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_media_router))
return nullptr;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: callback
// Execute
cef_media_router_t* _retval = _struct->get_media_router(_struct);
cef_media_router_t* _retval = _struct->get_media_router(
_struct, CefCompletionCallbackCppToC::Wrap(callback));
// Return type: refptr_same
return CefMediaRouterCToCpp::Wrap(_retval);

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f54014218a54c7925d85df2f162fd51962dac2ce$
// $hash=0aff81f2ccc5881001e9fd61cc6e349253fb2ac5$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
@@ -75,7 +75,8 @@ class CefRequestContextCToCpp
bool HasExtension(const CefString& extension_id) OVERRIDE;
bool GetExtensions(std::vector<CefString>& extension_ids) OVERRIDE;
CefRefPtr<CefExtension> GetExtension(const CefString& extension_id) OVERRIDE;
CefRefPtr<CefMediaRouter> GetMediaRouter() OVERRIDE;
CefRefPtr<CefMediaRouter> GetMediaRouter(
CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_