Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.h

Issue 2000063005: [WIP] Speculatively launch Service Workers on mouse/touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/chrome_render_message_filter.h
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.h b/chrome/browser/renderer_host/chrome_render_message_filter.h
index 97bf627c4d9b248fab3f43afc9b43c69db0b858a..2ed27b0ca720b5e24753a1e191d6b7da7d4a3fa3 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.h
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.h
@@ -16,10 +16,18 @@
class GURL;
class Profile;
+namespace blink {
+enum class WebNavigationHintType;
+}
+
namespace chrome_browser_net {
class Predictor;
}
+namespace content {
+class ServiceWorkerContext;
+}
+
namespace content_settings {
class CookieSettings;
}
@@ -36,7 +44,10 @@ class InfoMap;
// process on the IPC thread.
class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
public:
- ChromeRenderMessageFilter(int render_process_id, Profile* profile);
+ ChromeRenderMessageFilter(
+ int render_process_id,
+ Profile* profile,
+ content::ServiceWorkerContext* service_worker_context);
// content::BrowserMessageFilter methods:
bool OnMessageReceived(const IPC::Message& message) override;
@@ -51,6 +62,7 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
void OnDnsPrefetch(const network_hints::LookupRequest& request);
void OnPreconnect(const GURL& url, bool allow_credentials, int count);
+ void OnNavigationHint(const GURL& url, blink::WebNavigationHintType type);
void OnUpdatedCacheStats(uint64_t min_capacity,
uint64_t max_capacity,
uint64_t capacity,
@@ -132,6 +144,9 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
// Used to look up permissions at database creation time.
scoped_refptr<content_settings::CookieSettings> cookie_settings_;
+ // Used to start Service Workers for navigation hints.
+ content::ServiceWorkerContext* service_worker_context_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter);
};
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698