2013-09-03 18:43:31 +02:00
|
|
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_REQUEST_CONTEXT_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_REQUEST_CONTEXT_IMPL_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "include/cef_request_context.h"
|
2015-02-14 00:17:08 +01:00
|
|
|
#include "libcef/browser/browser_context.h"
|
2013-09-03 18:43:31 +02:00
|
|
|
|
|
|
|
class CefRequestContextImpl : public CefRequestContext {
|
|
|
|
public:
|
2015-02-14 00:17:08 +01:00
|
|
|
explicit CefRequestContextImpl(
|
|
|
|
scoped_refptr<CefBrowserContext> browser_context);
|
2013-09-03 18:43:31 +02:00
|
|
|
explicit CefRequestContextImpl(CefRefPtr<CefRequestContextHandler> handler);
|
2014-11-12 20:25:15 +01:00
|
|
|
~CefRequestContextImpl() override;
|
2013-09-03 18:43:31 +02:00
|
|
|
|
2015-02-14 00:17:08 +01:00
|
|
|
scoped_refptr<CefBrowserContext> GetOrCreateBrowserContext();
|
2013-09-03 18:43:31 +02:00
|
|
|
|
2014-11-12 20:25:15 +01:00
|
|
|
bool IsSame(CefRefPtr<CefRequestContext> other) override;
|
|
|
|
bool IsGlobal() override;
|
|
|
|
CefRefPtr<CefRequestContextHandler> GetHandler() override;
|
2013-09-03 18:43:31 +02:00
|
|
|
|
|
|
|
protected:
|
2015-02-14 00:17:08 +01:00
|
|
|
scoped_refptr<CefBrowserContext> browser_context_;
|
2013-09-03 18:43:31 +02:00
|
|
|
CefRefPtr<CefRequestContextHandler> handler_;
|
|
|
|
|
|
|
|
// Used to uniquely identify CefRequestContext objects before an associated
|
|
|
|
// CefBrowserContext has been created.
|
|
|
|
int unique_id_;
|
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING(CefRequestContextImpl);
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefRequestContextImpl);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_REQUEST_CONTEXT_IMPL_H_
|