mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Convert CefCookieManagerImpl to use CefBrowserContext::Getter.
With this change CefCookieManagerImpl no longer keeps a reference to the originating CefRequestContextImpl. This means that the CefRequestContextImpl can be destroyed if all other references are released while the CefCookieManagerImpl exists. If CefRequestContextImpl destruction results in the underlying CefBrowserContext being destroyed then the CefCookieManagerImpl's reference to that CefBrowserContext will be invalidated. This is the same ownership model introduced with CefMediaRouterImpl in the previous commit.
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#include "include/cef_request_context.h"
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/media_router/media_router_impl.h"
|
||||
#include "libcef/browser/net_service/cookie_manager_impl.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
|
||||
class CefBrowserContext;
|
||||
@ -149,6 +150,9 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
CefRefPtr<CefResolveCallback> callback,
|
||||
CefBrowserContext* browser_context);
|
||||
|
||||
void InitializeCookieManagerOnUIThread(
|
||||
CefRefPtr<CefCookieManagerImpl> cookie_manager,
|
||||
CefRefPtr<CefCompletionCallback> callback);
|
||||
void InitializeMediaRouterOnUIThread(
|
||||
CefRefPtr<CefMediaRouterImpl> media_router);
|
||||
|
||||
|
Reference in New Issue
Block a user