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

Unified Diff: third_party/WebKit/Source/platform/network/NetworkHints.h

Issue 2043753002: Declarative resource hints go through mojo IPC to //content 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: third_party/WebKit/Source/platform/network/NetworkHints.h
diff --git a/third_party/WebKit/Source/platform/network/NetworkHints.h b/third_party/WebKit/Source/platform/network/NetworkHints.h
index 918e560235437db5defabefee7dcc26c683f2c8e..215e66e63c0b54d1a3e29655a7f85c34495ea174 100644
--- a/third_party/WebKit/Source/platform/network/NetworkHints.h
+++ b/third_party/WebKit/Source/platform/network/NetworkHints.h
@@ -30,13 +30,29 @@
#include "platform/CrossOriginAttributeValue.h"
#include "platform/PlatformExport.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/resource_hints.mojom-blink.h"
#include "wtf/Forward.h"
namespace blink {
-PLATFORM_EXPORT void prefetchDNS(const String& hostname);
+// This is used for speculative prefetches that are only enabled for HTTP sites.
+// This includes <a> tag scanning and mouse hover predictions.
+PLATFORM_EXPORT void speculativePrefetchDNS(const String& hostname);
+
+PLATFORM_EXPORT void prefetchDNS(const KURL&);
PLATFORM_EXPORT void preconnect(const KURL&, const CrossOriginAttributeValue);
+class ResourceHintsDispatcher {
yzshen1 2016/06/08 17:40:53 It seems this class can be hidden in an anonymous
Charlie Harrison 2016/06/10 14:20:00 Done.
+public:
+ static ResourceHintsDispatcher& instance();
+ void preconnect(const KURL&, CrossOriginAttributeValue, int numConnections);
+ void preresolve(const KURL&);
+
+private:
+ ResourceHintsDispatcher();
+ mojom::blink::ResourceHintsDispatcherHostPtr m_host;
+};
+
} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698