Chromium Code Reviews| Index: Source/Platform/chromium/public/WebPrescientNetworking.h |
| diff --git a/Source/Platform/chromium/public/WebGraphicsContext3DProvider.h b/Source/Platform/chromium/public/WebPrescientNetworking.h |
| similarity index 65% |
| copy from Source/Platform/chromium/public/WebGraphicsContext3DProvider.h |
| copy to Source/Platform/chromium/public/WebPrescientNetworking.h |
| index dba2216773526377c53b27a9d6830bce0c25fc48..c5a961a8f011194404bb0a82dce0c6057f01ec38 100644 |
| --- a/Source/Platform/chromium/public/WebGraphicsContext3DProvider.h |
| +++ b/Source/Platform/chromium/public/WebPrescientNetworking.h |
| @@ -28,24 +28,33 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef WebGraphicsContext3DProvider_h |
| -#define WebGraphicsContext3DProvider_h |
| +#ifndef WebPrescientNetworking_h |
| +#define WebPrescientNetworking_h |
| #include "WebCommon.h" |
| -class GrContext; |
| - |
| namespace WebKit { |
| -class WebGraphicsContext3D; |
| -class WebGraphicsContext3DProvider { |
| -public: |
| - virtual ~WebGraphicsContext3DProvider() { } |
| +class WebURL; |
| + |
| +// FIXME: Passing preconnect motivation to the platform is layering vioration. |
| +// However, this is done temporarily to perform a Finch field trial to enable |
| +// preconnect in different triggers one at a time. This enum can be safely |
| +// removed after the field trial is done. |
| +enum WebPreconnectMotivation { |
| + WebPreconnectMotivationLinkMouseDown, |
| + WebPreconnectMotivationLinkMouseOver, |
| + WebPreconnectMotivationLinkTapUnconfirmed, |
| + WebPreconnectMotivationLinkTapDown, |
| +}; |
| - virtual WebGraphicsContext3D* context3d() = 0; |
| - virtual GrContext* grContext() = 0; |
| +class WebPrescientNetworking { |
| +public: |
| + // When a page navigation is speculated, preconnect is triggered to hide |
| + // session initialization latency to the server providing the page resource. |
| + virtual void preconnect(const WebURL&, WebPreconnectMotivation) { } |
| }; |
|
abarth-chromium
2013/05/14 06:38:47
You might also need a virtual destructor to make s
kouhei (in TOK)
2013/05/14 07:25:14
Done.
|
| } // namespace WebKit |
| -#endif |
| +#endif // WebPrescientNetworking_h |