OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ | 5 #ifndef COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ |
6 #define COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ | 6 #define COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/network_hints/renderer/renderer_dns_prefetch.h" | 9 #include "components/network_hints/renderer/renderer_dns_prefetch.h" |
10 #include "components/network_hints/renderer/renderer_navigation_hint_sender.h" | |
10 #include "components/network_hints/renderer/renderer_preconnect.h" | 11 #include "components/network_hints/renderer/renderer_preconnect.h" |
11 #include "third_party/WebKit/public/platform/WebPrescientNetworking.h" | 12 #include "third_party/WebKit/public/platform/WebPrescientNetworking.h" |
12 | 13 |
14 namespace blink { | |
15 enum class WebNavigationHintType; | |
16 } | |
17 | |
13 namespace network_hints { | 18 namespace network_hints { |
14 | 19 |
15 // The main entry point from blink for sending DNS prefetch requests to the | 20 // The main entry point from blink for sending DNS prefetch requests to the |
16 // network stack. | 21 // network stack. |
17 class PrescientNetworkingDispatcher : public blink::WebPrescientNetworking { | 22 class PrescientNetworkingDispatcher : public blink::WebPrescientNetworking { |
18 public: | 23 public: |
19 PrescientNetworkingDispatcher(); | 24 PrescientNetworkingDispatcher(); |
20 ~PrescientNetworkingDispatcher() override; | 25 ~PrescientNetworkingDispatcher() override; |
21 | 26 |
22 void prefetchDNS(const blink::WebString& hostname) override; | 27 void prefetchDNS(const blink::WebString& hostname) override; |
23 void preconnect(const blink::WebURL& url, | 28 void preconnect(const blink::WebURL& url, |
24 const bool allow_credentials) override; | 29 const bool allow_credentials) override; |
30 void sendNavigationHint(const blink::WebURL& url, | |
31 blink::WebNavigationHintType type) override; | |
kinuko
2016/06/24 07:40:47
This class mostly has requests to the network stac
| |
25 | 32 |
26 private: | 33 private: |
27 network_hints::RendererDnsPrefetch dns_prefetch_; | 34 network_hints::RendererDnsPrefetch dns_prefetch_; |
28 network_hints::RendererPreconnect preconnect_; | 35 network_hints::RendererPreconnect preconnect_; |
36 network_hints::RendererNavigationHintSender navigation_hint_sender_; | |
29 | 37 |
30 DISALLOW_COPY_AND_ASSIGN(PrescientNetworkingDispatcher); | 38 DISALLOW_COPY_AND_ASSIGN(PrescientNetworkingDispatcher); |
31 }; | 39 }; |
32 | 40 |
33 } // namespace network_hints | 41 } // namespace network_hints |
34 | 42 |
35 #endif // COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ | 43 #endif // COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ |
OLD | NEW |