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

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=3767c7759578cd4abc1c2ecef504e7ed60775abb$
// $hash=79e4e38c732c0cfeef495c8a9726e105054012bb$
//
#ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_
@@ -41,6 +41,7 @@
#pragma once
#include "include/capi/cef_base_capi.h"
#include "include/capi/cef_callback_capi.h"
#include "include/capi/cef_registration_capi.h"
#ifdef __cplusplus
@@ -110,11 +111,14 @@ typedef struct _cef_media_router_t {
} cef_media_router_t;
///
// Returns the MediaRouter object associated with the global request context.
// Equivalent to calling cef_request_context_t::cef_request_context_get_global_c
// ontext()->get_media_router().
// Returns the MediaRouter object associated with the global request context. If
// |callback| is non-NULL it will be executed asnychronously on the UI thread
// after the manager's storage has been initialized. Equivalent to calling cef_r
// equest_context_t::cef_request_context_get_global_context()->get_media_router(
// ).
///
CEF_EXPORT cef_media_router_t* cef_media_router_get_global();
CEF_EXPORT cef_media_router_t* cef_media_router_get_global(
struct _cef_completion_callback_t* callback);
///
// Implemented by the client to observe MediaRouter events and registered via

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d5079b6a5146ccd2085c3bbf948925c009d329ed$
// $hash=2e42334fc22050e207e5a0af6fe290a592e4105f$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
@@ -132,7 +132,7 @@ typedef struct _cef_request_context_t {
///
// Returns the cookie manager for this object. If |callback| is non-NULL it
// will be executed asnychronously on the IO thread after the manager's
// will be executed asnychronously on the UI thread after the manager's
// storage has been initialized.
///
struct _cef_cookie_manager_t*(CEF_CALLBACK* get_cookie_manager)(
@@ -356,10 +356,13 @@ typedef struct _cef_request_context_t {
const cef_string_t* extension_id);
///
// Returns the MediaRouter object associated with this context.
// Returns the MediaRouter object associated with this context. If |callback|
// is non-NULL it will be executed asnychronously on the UI thread after the
// manager's context has been initialized.
///
struct _cef_media_router_t*(CEF_CALLBACK* get_media_router)(
struct _cef_request_context_t* self);
struct _cef_request_context_t* self,
struct _cef_completion_callback_t* callback);
} cef_request_context_t;
///