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..f6342dc8ce474341498da7f2b303f53526f7900f 100644 |
--- a/chrome/browser/renderer_host/chrome_render_message_filter.h |
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.h |
@@ -11,7 +11,9 @@ |
#include "base/callback.h" |
#include "base/macros.h" |
#include "base/sequenced_task_runner_helpers.h" |
+#include "components/network_hints/public/interfaces/network_hints.mojom.h" |
#include "content/public/browser/browser_message_filter.h" |
+#include "mojo/public/cpp/bindings/binding_set.h" |
class GURL; |
class Profile; |
@@ -34,7 +36,8 @@ class InfoMap; |
// This class filters out incoming Chrome-specific IPC messages for the renderer |
// process on the IPC thread. |
-class ChromeRenderMessageFilter : public content::BrowserMessageFilter { |
+class ChromeRenderMessageFilter : public content::BrowserMessageFilter, |
+ public network_hints::mojom::NetworkHints { |
dcheng
2016/07/20 13:59:50
Does that mean this is going to end up implementin
tibell
2016/07/21 00:12:06
Yes potentially. At some point it probably makes s
|
public: |
ChromeRenderMessageFilter(int render_process_id, Profile* profile); |
@@ -43,14 +46,18 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter { |
void OverrideThreadForMessage(const IPC::Message& message, |
content::BrowserThread::ID* thread) override; |
+ void BindNetworkHints(network_hints::mojom::NetworkHintsRequest request); |
+ |
private: |
friend class content::BrowserThread; |
friend class base::DeleteHelper<ChromeRenderMessageFilter>; |
~ChromeRenderMessageFilter() override; |
- void OnDnsPrefetch(const network_hints::LookupRequest& request); |
- void OnPreconnect(const GURL& url, bool allow_credentials, int count); |
+ // mojom::NetworkHints methods: |
+ void DNSPrefetch(const network_hints::LookupRequest& request) override; |
+ void Preconnect(const GURL& url, bool allow_credentials, int count) override; |
+ |
void OnUpdatedCacheStats(uint64_t min_capacity, |
uint64_t max_capacity, |
uint64_t capacity, |
@@ -132,6 +139,8 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter { |
// Used to look up permissions at database creation time. |
scoped_refptr<content_settings::CookieSettings> cookie_settings_; |
+ mojo::BindingSet<network_hints::mojom::NetworkHints> bindings_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter); |
}; |