cef/libcef/browser/request_context_impl.h
Marshall Greenblatt 385be456c3 Structural improvements for request handling (issue #1044)
- Add new CefRequestContext and CefRequestContextHandler classes.
- Add CefRequestContext argument to CefBrowserHost static factory methods.
- Move GetCookieManager from CefRequestHandler to CefRequestContextHandler.
- Use BrowserContext as the root proxy object for network requests.
- Move accessors for CefBrowserMainParts members from CefContext to CefContentBrowserClient.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1424 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-09-03 16:43:31 +00:00

38 lines
1.2 KiB
C++

// 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"
class CefBrowserContext;
class CefRequestContextImpl : public CefRequestContext {
public:
explicit CefRequestContextImpl(CefBrowserContext* browser_context);
explicit CefRequestContextImpl(CefRefPtr<CefRequestContextHandler> handler);
virtual ~CefRequestContextImpl();
CefBrowserContext* GetOrCreateBrowserContext();
virtual bool IsSame(CefRefPtr<CefRequestContext> other) OVERRIDE;
virtual bool IsGlobal() OVERRIDE;
virtual CefRefPtr<CefRequestContextHandler> GetHandler() OVERRIDE;
protected:
CefBrowserContext* browser_context_;
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_