Title: [115703] trunk/Source
Revision
115703
Author
[email protected]
Date
2012-04-30 19:51:27 -0700 (Mon, 30 Apr 2012)

Log Message

[Chromium] Add thunk headers for staging Prerendering API.
https://bugs.webkit.org/show_bug.cgi?id=84880

Reviewed by Adam Barth.

These empty headers will be replaced by the actual API when Bug 85005 is commited.

Source/Platform:

* Platform.gypi:
* chromium/public/WebPrerender.h: Added.
(WebKit):
(WebPrerender):
(ExtraData):
(WebKit::WebPrerender::ExtraData::~ExtraData):
(WebKit::WebPrerender::url):
(WebKit::WebPrerender::referrer):
(WebKit::WebPrerender::referrerPolicy):
(WebKit::WebPrerender::setExtraData):
(WebKit::WebPrerender::extraData):
(WebKit::WebPrerender::WebPrerender):
(WebKit::WebPrerender::~WebPrerender):
* chromium/public/WebPrerenderingSupport.h: Added.
(WebKit):
(WebPrerenderingSupport):
(WebKit::WebPrerenderingSupport::initialize):
(WebKit::WebPrerenderingSupport::shutdown):
(WebKit::WebPrerenderingSupport::current):
(WebKit::WebPrerenderingSupport::add):
(WebKit::WebPrerenderingSupport::cancel):
(WebKit::WebPrerenderingSupport::abandon):
(WebKit::WebPrerenderingSupport::WebPrerenderingSupport):
(WebKit::WebPrerenderingSupport::~WebPrerenderingSupport):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebPrerendererClient.h: Added.
(WebKit):
(WebPrerendererClient):
* public/WebView.h:
(WebKit):
(WebKit::WebView::setPrerendererClient):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (115702 => 115703)


--- trunk/Source/Platform/ChangeLog	2012-05-01 02:38:40 UTC (rev 115702)
+++ trunk/Source/Platform/ChangeLog	2012-05-01 02:51:27 UTC (rev 115703)
@@ -1,3 +1,37 @@
+2012-04-30  Gavin Peters  <[email protected]>
+
+        [Chromium] Add thunk headers for staging Prerendering API.
+        https://bugs.webkit.org/show_bug.cgi?id=84880
+
+        Reviewed by Adam Barth.
+
+        These empty headers will be replaced by the actual API when Bug 85005 is commited.
+
+        * Platform.gypi:
+        * chromium/public/WebPrerender.h: Added.
+        (WebKit):
+        (WebPrerender):
+        (ExtraData):
+        (WebKit::WebPrerender::ExtraData::~ExtraData):
+        (WebKit::WebPrerender::url):
+        (WebKit::WebPrerender::referrer):
+        (WebKit::WebPrerender::referrerPolicy):
+        (WebKit::WebPrerender::setExtraData):
+        (WebKit::WebPrerender::extraData):
+        (WebKit::WebPrerender::WebPrerender):
+        (WebKit::WebPrerender::~WebPrerender):
+        * chromium/public/WebPrerenderingSupport.h: Added.
+        (WebKit):
+        (WebPrerenderingSupport):
+        (WebKit::WebPrerenderingSupport::initialize):
+        (WebKit::WebPrerenderingSupport::shutdown):
+        (WebKit::WebPrerenderingSupport::current):
+        (WebKit::WebPrerenderingSupport::add):
+        (WebKit::WebPrerenderingSupport::cancel):
+        (WebKit::WebPrerenderingSupport::abandon):
+        (WebKit::WebPrerenderingSupport::WebPrerenderingSupport):
+        (WebKit::WebPrerenderingSupport::~WebPrerenderingSupport):
+
 2012-04-26  James Robinson  <[email protected]>
 
         [chromium] Separate IOSurface layer type from texture layers

Modified: trunk/Source/Platform/Platform.gypi (115702 => 115703)


--- trunk/Source/Platform/Platform.gypi	2012-05-01 02:38:40 UTC (rev 115702)
+++ trunk/Source/Platform/Platform.gypi	2012-05-01 02:51:27 UTC (rev 115703)
@@ -73,6 +73,8 @@
             'chromium/public/WebPeerConnectionHandler.h',
             'chromium/public/WebPeerConnectionHandlerClient.h',
             'chromium/public/WebPoint.h',
+            'chromium/public/WebPrerender.h',
+            'chromium/public/WebPrerenderingSupport.h',
             'chromium/public/WebPrivateOwnPtr.h',
             'chromium/public/WebPrivatePtr.h',
             'chromium/public/WebRect.h',

Added: trunk/Source/Platform/chromium/public/WebPrerender.h (0 => 115703)


--- trunk/Source/Platform/chromium/public/WebPrerender.h	                        (rev 0)
+++ trunk/Source/Platform/chromium/public/WebPrerender.h	2012-05-01 02:51:27 UTC (rev 115703)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPrerender_h
+#define WebPrerender_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+#include "WebReferrerPolicy.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+#endif
+
+namespace WebKit {
+
+// This thunk implementation of WebPrerender exists only for staging; this will allow
+// the Chromium side of the Prerendering API to land, and then later we can atomicly
+// switch WebKit to prerender, and finally remove the old phantom-request prerender
+// implementation from Chromium.
+// FIXME: Put the actual implementation here after the Chromium side of this API
+// lands.
+class WebPrerender {
+public:
+    class ExtraData {
+    public:
+        virtual ~ExtraData() { }
+    };
+    WebURL url() const { return WebURL(); }
+    WebString referrer() const { return ""; }
+    WebReferrerPolicy referrerPolicy() const { return WebReferrerPolicy(); }
+    void setExtraData(ExtraData*) { }
+    const ExtraData* extraData() const { return 0; }
+
+private:
+    WebPrerender() { }
+    ~WebPrerender() { }
+};
+
+} // namespace WebKit
+
+#endif // WebPrerender_h

Added: trunk/Source/Platform/chromium/public/WebPrerenderingSupport.h (0 => 115703)


--- trunk/Source/Platform/chromium/public/WebPrerenderingSupport.h	                        (rev 0)
+++ trunk/Source/Platform/chromium/public/WebPrerenderingSupport.h	2012-05-01 02:51:27 UTC (rev 115703)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPrerenderingSupport_h
+#define WebPrerenderingSupport_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebPrerender;
+
+// This thunk implementation of WebPrerenderingSupport exists only for staging; this will
+// allow the Chromium side of the Prerendering API to land, and then later we can atomicly
+// switch WebKit to prerender, and finally remove the old phantom-request prerender
+// implementation from Chromium.
+// FIXME: Put the actual implementation here after the Chromium side of this API
+// lands.
+class WebPrerenderingSupport {
+public:
+    static void initialize(WebPrerenderingSupport*) { }
+    static void shutdown() { }
+    static WebPrerenderingSupport* current() { return 0; }
+
+    virtual void add(const WebPrerender&) { }
+    virtual void cancel(const WebPrerender&) { }
+    virtual void abandon(const WebPrerender&) { }
+
+protected:
+    WebPrerenderingSupport() { }
+    virtual ~WebPrerenderingSupport() { }
+};
+
+} // namespace WebKit
+
+#endif // WebPrerenderingSupport_h

Modified: trunk/Source/WebKit/chromium/ChangeLog (115702 => 115703)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-01 02:38:40 UTC (rev 115702)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-01 02:51:27 UTC (rev 115703)
@@ -1,3 +1,20 @@
+2012-04-30  Gavin Peters  <[email protected]>
+
+        [Chromium] Add thunk headers for staging Prerendering API.
+        https://bugs.webkit.org/show_bug.cgi?id=84880
+
+        Reviewed by Adam Barth.
+
+        These empty headers will be replaced by the actual API when Bug 85005 is commited.
+
+        * WebKit.gyp:
+        * public/WebPrerendererClient.h: Added.
+        (WebKit):
+        (WebPrerendererClient):
+        * public/WebView.h:
+        (WebKit):
+        (WebKit::WebView::setPrerendererClient):
+
 2012-04-30  Ilya Sherman  <[email protected]>
 
         [Chromium] Fix Autofill popup visibility behavior

Modified: trunk/Source/WebKit/chromium/WebKit.gyp (115702 => 115703)


--- trunk/Source/WebKit/chromium/WebKit.gyp	2012-05-01 02:38:40 UTC (rev 115702)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2012-05-01 02:51:27 UTC (rev 115703)
@@ -227,6 +227,7 @@
                 'public/WebPopupMenu.h',
                 'public/WebPopupMenuInfo.h',
                 'public/WebPopupType.h',
+                'public/WebPrerendererClient.h',
                 'public/WebRange.h',
                 'public/WebRegularExpression.h',
                 'public/WebRuntimeFeatures.h',

Added: trunk/Source/WebKit/chromium/public/WebPrerendererClient.h (0 => 115703)


--- trunk/Source/WebKit/chromium/public/WebPrerendererClient.h	                        (rev 0)
+++ trunk/Source/WebKit/chromium/public/WebPrerendererClient.h	2012-05-01 02:51:27 UTC (rev 115703)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef WebPrerendererClient_h
+#define WebPrerendererClient_h
+
+#include "platform/WebCommon.h"
+
+namespace WebKit {
+
+class WebPrerender;
+
+class WebPrerendererClient {
+public:
+    virtual void willAddPrerender(WebPrerender*) = 0;
+};
+
+} // namespace WebPrerendererClient_h
+
+#endif // WebPrerendererClient_h

Modified: trunk/Source/WebKit/chromium/public/WebView.h (115702 => 115703)


--- trunk/Source/WebKit/chromium/public/WebView.h	2012-05-01 02:38:40 UTC (rev 115702)
+++ trunk/Source/WebKit/chromium/public/WebView.h	2012-05-01 02:51:27 UTC (rev 115703)
@@ -51,6 +51,7 @@
 class WebNode;
 class WebPageOverlay;
 class WebPermissionClient;
+class WebPrerendererClient;
 class WebRange;
 class WebSettings;
 class WebSpellCheckClient;
@@ -106,6 +107,9 @@
     virtual void setAutofillClient(WebAutofillClient*) = 0;
     virtual void setDevToolsAgentClient(WebDevToolsAgentClient*) = 0;
     virtual void setPermissionClient(WebPermissionClient*) = 0;
+    // FIXME: After the Prerendering API lands in chrome, remove this staging thunk
+    // for setPrerendererClient().
+    virtual void setPrerendererClient(WebPrerendererClient*) { }
     virtual void setSpellCheckClient(WebSpellCheckClient*) = 0;
     virtual void addTextFieldDecoratorClient(WebTextFieldDecoratorClient*) = 0;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to