mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add download handling support via new CefDownloadHandler and CefDownloadItem interfaces (issue #516).
- Fix setting of CefKeyEvent.focus_on_editable_field when the underlying RenderViewHost changes. - Fix potential crash if URLRequest objects are still in-progress upon shutdown. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@715 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
43
libcef/browser/url_request_context_proxy.h
Normal file
43
libcef/browser/url_request_context_proxy.h
Normal file
@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2012 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_BROWSER_URL_REQUEST_CONTEXT_PROXY_H_
|
||||
#define CEF_LIBCEF_BROWSER_URL_REQUEST_CONTEXT_PROXY_H_
|
||||
#pragma once
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
|
||||
class CefBrowserHostImpl;
|
||||
|
||||
namespace net {
|
||||
class CookieStore;
|
||||
class URLRequestContextGetter;
|
||||
}
|
||||
|
||||
class CefURLRequestContextProxy : public net::URLRequestContext {
|
||||
public:
|
||||
explicit CefURLRequestContextProxy(net::URLRequestContextGetter* parent);
|
||||
virtual ~CefURLRequestContextProxy();
|
||||
|
||||
virtual const std::string& GetUserAgent(const GURL& url) const OVERRIDE;
|
||||
|
||||
void Initialize(CefBrowserHostImpl* browser);
|
||||
|
||||
// We may try to delete this proxy multiple times if URLRequests are still
|
||||
// pending. Keep track of the number of tries so that they don't become
|
||||
// excessive.
|
||||
int delete_try_count() const { return delete_try_count_; }
|
||||
void increment_delete_try_count() { delete_try_count_++; }
|
||||
|
||||
private:
|
||||
net::URLRequestContextGetter* parent_;
|
||||
scoped_refptr<net::CookieStore> cookie_store_proxy_;
|
||||
|
||||
int delete_try_count_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefURLRequestContextProxy);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_URL_REQUEST_CONTEXT_PROXY_H_
|
Reference in New Issue
Block a user