Index: Source/core/platform/network/Preconnect.cpp |
diff --git a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp b/Source/core/platform/network/Preconnect.cpp |
similarity index 78% |
copy from Source/core/page/RuntimeEnabledFeaturesCustom.cpp |
copy to Source/core/platform/network/Preconnect.cpp |
index 2df390c281f06a8f6ea2157ba8be109616028eb0..7de8c3fc831b8c7c04d766866f310c7ab7b4ecd2 100644 |
--- a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp |
+++ b/Source/core/platform/network/Preconnect.cpp |
@@ -29,21 +29,20 @@ |
*/ |
#include "config.h" |
-#include "RuntimeEnabledFeatures.h" |
+#include "core/platform/network/Preconnect.h" |
-#include "core/platform/graphics/MediaPlayer.h" |
-#include "core/workers/SharedWorkerRepository.h" |
+#include <public/Platform.h> |
+#include <public/WebURL.h> |
+#include <public/WebPrerenderingSupport.h> |
namespace WebCore { |
-bool RuntimeEnabledFeatures::mediaEnabled() |
+void preconnect(const KURL& url, PreconnectMotivation motivation) |
{ |
- return MediaPlayer::isAvailable(); |
+ WebKit::WebPrerenderingSupport* platform = WebKit::WebPrerenderingSupport::current(); |
+ if (!platform) |
+ return; |
+ platform->preconnect(WebKit::WebURL(url), static_cast<WebKit::WebPreconnectMotivation>(motivation)); |
} |
-bool RuntimeEnabledFeatures::sharedWorkerEnabled() |
-{ |
- return SharedWorkerRepository::isAvailable(); |
} |
- |
-} // namespace WebCore |