2010-10-03 23:04:50 +02:00
|
|
|
// Copyright (c) 2008 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#ifndef CEF_LIBCEF_BROWSER_RESOURCE_LOADER_BRIDGE_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_RESOURCE_LOADER_BRIDGE_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2011-12-23 18:36:30 +01:00
|
|
|
#include "include/cef_base.h"
|
2010-10-03 23:04:50 +02:00
|
|
|
#include "base/message_loop_proxy.h"
|
2011-12-15 15:47:23 +01:00
|
|
|
#include "net/url_request/url_request.h"
|
2011-12-16 15:51:10 +01:00
|
|
|
#include "webkit/glue/resource_loader_bridge.h"
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2011-12-23 18:36:30 +01:00
|
|
|
class CefBrowser;
|
2010-10-03 23:04:50 +02:00
|
|
|
class GURL;
|
|
|
|
|
|
|
|
class BrowserResourceLoaderBridge {
|
|
|
|
public:
|
2011-10-07 12:13:04 +02:00
|
|
|
// Return the CefBrowser associated with the specified request. The browser
|
|
|
|
// will be NULL in cases where the request was initiated using the
|
|
|
|
// CefWebURLRequest API.
|
|
|
|
static CefRefPtr<CefBrowser> GetBrowserForRequest(net::URLRequest* request);
|
|
|
|
|
2011-12-16 15:51:10 +01:00
|
|
|
// Creates a ResourceLoaderBridge instance.
|
|
|
|
static webkit_glue::ResourceLoaderBridge* Create(
|
|
|
|
const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info);
|
|
|
|
|
2010-10-03 23:04:50 +02:00
|
|
|
static scoped_refptr<base::MessageLoopProxy> GetCacheThread();
|
2011-12-15 15:47:23 +01:00
|
|
|
|
|
|
|
// Used for intercepting URL redirects. Only one interceptor will be created
|
|
|
|
// and its lifespan is controlled by the BrowserRequestContext.
|
|
|
|
static net::URLRequest::Interceptor* CreateRequestInterceptor();
|
2010-10-03 23:04:50 +02:00
|
|
|
};
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#endif // CEF_LIBCEF_BROWSER_RESOURCE_LOADER_BRIDGE_H_
|
2010-10-03 23:04:50 +02:00
|
|
|
|