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

Unified Diff: Source/core/platform/network/Preconnect.cpp

Issue 14746002: Add WebPrescientNetworking to trigger preconnect from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use WebPrescientNetworking instead of WebPrerenderingSupport Created 7 years, 7 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: Source/core/platform/network/Preconnect.cpp
diff --git a/Source/core/animation/TimedItem.cpp b/Source/core/platform/network/Preconnect.cpp
similarity index 78%
copy from Source/core/animation/TimedItem.cpp
copy to Source/core/platform/network/Preconnect.cpp
index ef2fa7e471d6cd8fba309cc6189186fbd4911af6..ffc62a7f5e52bfdb2634748b0a54b3397f975ff4 100644
--- a/Source/core/animation/TimedItem.cpp
+++ b/Source/core/platform/network/Preconnect.cpp
@@ -29,20 +29,20 @@
*/
#include "config.h"
-#include "core/animation/TimedItem.h"
+#include "core/platform/network/Preconnect.h"
-#include "core/animation/Animation.h"
+#include <public/Platform.h>
+#include <public/WebPrescientNetworking.h>
+#include <public/WebURL.h>
namespace WebCore {
-TimedItem::TimedItem()
+void preconnect(const KURL& url, PreconnectMotivation motivation)
{
+ WebKit::WebPrescientNetworking* platform = WebKit::WebPrescientNetworking::current();
abarth-chromium 2013/05/14 06:18:56 WebKit::Platform::current()->precientNeworking()
kouhei (in TOK) 2013/05/14 06:34:07 removed this file. Done.
+ if (!platform)
+ return;
+ platform->preconnect(WebKit::WebURL(url), static_cast<WebKit::WebPreconnectMotivation>(motivation));
}
-void TimedItem::updateTimeFraction(double time)
-{
- m_timeFraction = time < 1 ? time : 1;
- m_currentIteration = 0;
}
-
-} // namespace
« Source/core/platform/network/Preconnect.h ('K') | « Source/core/platform/network/Preconnect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698