Title: [121590] trunk/Source/WebKit2
Revision
121590
Author
[email protected]
Date
2012-06-29 14:43:31 -0700 (Fri, 29 Jun 2012)

Log Message

[WK2] Move intent delivery code from the frame to the page
https://bugs.webkit.org/show_bug.cgi?id=89974

Patch by Christophe Dumez <[email protected]> on 2012-06-29
Reviewed by Anders Carlsson.

Move the intent delivery code from the frame to the page
and add the corresponding C API for WKPage.

* UIProcess/API/C/WKPage.cpp:
(WKPageDeliverIntentToFrame):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::stopLoading):
* UIProcess/WebFrameProxy.h:
(WebKit):
* UIProcess/WebPageProxy.cpp:
(WebKit):
(WebKit::WebPageProxy::deliverIntentToFrame):
* UIProcess/WebPageProxy.h:
(WebPageProxy):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (121589 => 121590)


--- trunk/Source/WebKit2/ChangeLog	2012-06-29 21:25:55 UTC (rev 121589)
+++ trunk/Source/WebKit2/ChangeLog	2012-06-29 21:43:31 UTC (rev 121590)
@@ -1,3 +1,26 @@
+2012-06-29  Christophe Dumez  <[email protected]>
+
+        [WK2] Move intent delivery code from the frame to the page
+        https://bugs.webkit.org/show_bug.cgi?id=89974
+
+        Reviewed by Anders Carlsson.
+
+        Move the intent delivery code from the frame to the page
+        and add the corresponding C API for WKPage.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageDeliverIntentToFrame):
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::stopLoading):
+        * UIProcess/WebFrameProxy.h:
+        (WebKit):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit):
+        (WebKit::WebPageProxy::deliverIntentToFrame):
+        * UIProcess/WebPageProxy.h:
+        (WebPageProxy):
+
 2012-06-29  Dan Bernstein  <[email protected]>
 
         Can’t get basic element info from a WKRenderObject

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (121589 => 121590)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2012-06-29 21:25:55 UTC (rev 121589)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2012-06-29 21:43:31 UTC (rev 121590)
@@ -684,6 +684,13 @@
 }
 #endif
 
+void WKPageDeliverIntentToFrame(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent)
+{
+#if ENABLE(WEB_INTENTS)
+    toImpl(page)->deliverIntentToFrame(toImpl(frame), toImpl(intent));
+#endif
+}
+
 WKImageRef WKPageCreateSnapshotOfVisibleContent(WKPageRef)
 {
     return 0;

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (121589 => 121590)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h	2012-06-29 21:25:55 UTC (rev 121589)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h	2012-06-29 21:43:31 UTC (rev 121590)
@@ -468,6 +468,8 @@
 typedef void (*WKPageForceRepaintFunction)(WKErrorRef, void*);
 WK_EXPORT void WKPageForceRepaint(WKPageRef page, void* context, WKPageForceRepaintFunction function);
 
+WK_EXPORT void WKPageDeliverIntentToFrame(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent);
+
 /*
     Some of the more common command name strings include the following, although any WebCore EditorCommand string is supported:
     

Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp (121589 => 121590)


--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp	2012-06-29 21:25:55 UTC (rev 121589)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp	2012-06-29 21:43:31 UTC (rev 121590)
@@ -37,10 +37,6 @@
 #include <stdio.h>
 #include <wtf/text/WTFString.h>
 
-#if ENABLE(WEB_INTENTS)
-#include "WebIntentData.h"
-#endif
-
 using namespace WebCore;
 using namespace std;
 
@@ -98,19 +94,6 @@
 
     m_page->process()->send(Messages::WebPage::StopLoadingFrame(m_frameID), m_page->pageID());
 }
-
-#if ENABLE(WEB_INTENTS)
-void WebFrameProxy::deliverIntent(WebIntentData* webIntentData)
-{
-    if (!m_page)
-        return;
-
-    if (!m_page->isValid())
-        return;
-
-    m_page->process()->send(Messages::WebPage::DeliverIntentToFrame(m_frameID, webIntentData->store()), m_page->pageID());
-}
-#endif
     
 bool WebFrameProxy::canProvideSource() const
 {

Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.h (121589 => 121590)


--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.h	2012-06-29 21:25:55 UTC (rev 121589)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.h	2012-06-29 21:43:31 UTC (rev 121590)
@@ -50,10 +50,6 @@
 class WebFramePolicyListenerProxy;
 class WebPageProxy;
 
-#if ENABLE(WEB_INTENTS)
-class WebIntentData;
-#endif
-
 typedef GenericCallback<WKDataRef> DataCallback;
 
 class WebFrameProxy : public APIObject {
@@ -90,10 +86,6 @@
     bool isFrameSet() const { return m_isFrameSet; }
 
     LoadState loadState() const { return m_loadState; }
-
-#if ENABLE(WEB_INTENTS)
-    void deliverIntent(WebIntentData*);
-#endif
     
     void stopLoading() const;
 

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (121589 => 121590)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-06-29 21:25:55 UTC (rev 121589)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-06-29 21:43:31 UTC (rev 121590)
@@ -1631,6 +1631,16 @@
     process()->send(Messages::WebPage::GetSourceForFrame(frame->frameID(), callbackID), m_pageID);
 }
 
+#if ENABLE(WEB_INTENTS)
+void WebPageProxy::deliverIntentToFrame(WebFrameProxy* frame, WebIntentData* webIntentData)
+{
+    if (!isValid())
+        return;
+
+    process()->send(Messages::WebPage::DeliverIntentToFrame(frame->frameID(), webIntentData->store()), m_pageID);
+}
+#endif
+
 void WebPageProxy::getContentsAsString(PassRefPtr<StringCallback> prpCallback)
 {
     RefPtr<StringCallback> callback = prpCallback;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (121589 => 121590)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2012-06-29 21:25:55 UTC (rev 121589)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2012-06-29 21:43:31 UTC (rev 121590)
@@ -124,6 +124,10 @@
 typedef Evas_Object* PlatformWidget;
 #endif
 
+#if ENABLE(WEB_INTENTS)
+class WebIntentData;
+#endif
+
 namespace WebKit {
 
 class NativeWebKeyboardEvent;
@@ -530,6 +534,10 @@
     void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptValueCallback>);
     void forceRepaint(PassRefPtr<VoidCallback>);
 
+#if ENABLE(WEB_INTENTS)
+    void deliverIntentToFrame(WebFrameProxy*, WebIntentData*);
+#endif
+
     float headerHeight(WebFrameProxy*);
     float footerHeight(WebFrameProxy*);
     void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to