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

@ -40,6 +40,7 @@
#include <vector>
#include "include/cef_base.h"
#include "include/cef_callback.h"
#include "include/cef_registration.h"
class CefMediaObserver;
@ -59,11 +60,13 @@ class CefMediaRouter : public virtual CefBaseRefCounted {
public:
///
// Returns the MediaRouter object associated with the global request context.
// Equivalent to calling
// CefRequestContext::GetGlobalContext()->GetMediaRouter().
// 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 CefRequestContext::GetGlobalContext()->GetMediaRouter().
///
/*--cef()--*/
static CefRefPtr<CefMediaRouter> GetGlobalMediaRouter();
/*--cef(optional_param=callback)--*/
static CefRefPtr<CefMediaRouter> GetGlobalMediaRouter(
CefRefPtr<CefCompletionCallback> callback);
///
// Add an observer for MediaRouter events. The observer will remain registered