summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_context_getter_qt.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-11-24 18:03:17 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2014-12-12 12:29:12 +0100
commit6ec3268a30a63d5c15258ea6f4f792e21930b093 (patch)
treeb2a122f94eed67546a7ee1d0f118a7e72ec18c8f /src/core/url_request_context_getter_qt.h
parentb93a478d60e90073870aad22febd519adc4a4a3b (diff)
Introduce QWebEngineProfile API
Introduces initial widgets API for the Chromium BrowserContext. Adds API for controlling cookie jar policy, user-agent string and cache and persistent data paths. Similar QML API will follow in another patch. [ChangeLog][QtWebEngineWidgets][QWebEngineProfile] New API for profiles applying to groups of QWebEnginePages. Change-Id: I3c4ef4053fde7564af29178c91a0aca8a2b61a5f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core/url_request_context_getter_qt.h')
-rw-r--r--src/core/url_request_context_getter_qt.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h
index 2c42322bd..5f6048403 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -40,6 +40,7 @@
#include "net/url_request/url_request_context_getter.h"
#include "base/files/file_path.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
#include "content/public/browser/content_browser_client.h"
@@ -50,26 +51,41 @@
#include "qglobal.h"
namespace net {
-class HostResolver;
class MappedHostResolver;
class NetworkDelegate;
class ProxyConfigService;
}
-class BrowserContextQt;
+class BrowserContextAdapter;
class URLRequestContextGetterQt : public net::URLRequestContextGetter {
public:
- explicit URLRequestContextGetterQt(BrowserContextQt *browserContext, content::ProtocolHandlerMap *protocolHandlers);
+ explicit URLRequestContextGetterQt(BrowserContextAdapter *browserContext, content::ProtocolHandlerMap *protocolHandlers);
virtual net::URLRequestContext *GetURLRequestContext() Q_DECL_OVERRIDE;
virtual scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() const Q_DECL_OVERRIDE;
+ // Called on the UI thread:
+ void updateStorageSettings();
+ void updateUserAgent();
+ void updateCookieStore();
+ void updateHttpCache();
+
private:
virtual ~URLRequestContextGetterQt() {}
+ // Called on the IO thread:
+ void generateStorage();
+ void generateCookieStore();
+ void generateHttpCache();
+ void generateUserAgent();
+ void generateJobFactory();
+
bool m_ignoreCertificateErrors;
- BrowserContextQt *m_browserContext;
+ volatile bool m_updateStorageSettings;
+ volatile bool m_updateCookieStore;
+ volatile bool m_updateHttpCache;
+ BrowserContextAdapter *m_browserContext;
content::ProtocolHandlerMap m_protocolHandlers;
scoped_ptr<net::ProxyConfigService> m_proxyConfigService;