2010-07-11 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / WebKit2 / WebProcess / InjectedBundle / API / c / WKBundle.h
index 3a1b1accfd831c8316cd9e59f0425040e7faefa9..a4e0246ccd09fab50e337ce34d324e22d82cb037 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef WKBundle_h
 #define WKBundle_h
 
+#include <WebKit2/WKBase.h>
 #include <WebKit2/WKBundleBase.h>
 
 #ifdef __cplusplus
@@ -33,17 +34,23 @@ extern "C" {
 #endif
 
 // Client
-typedef void (*WKBundleDidCreatePageCallback)(WKBundlePageRef page, const void *clientInfo);
+typedef void (*WKBundleDidCreatePageCallback)(WKBundleRef bundle, WKBundlePageRef page, const void *clientInfo);
+typedef void (*WKBundleWillDestroyPageCallback)(WKBundleRef bundle, WKBundlePageRef page, const void *clientInfo);
+typedef void (*WKBundleDidRecieveMessageCallback)(WKBundleRef bundle, WKStringRef message, const void *clientInfo);
 
 struct WKBundleClient {
     int                                                                 version;
     const void *                                                        clientInfo;
     WKBundleDidCreatePageCallback                                       didCreatePage;
+    WKBundleWillDestroyPageCallback                                     willDestroyPage;
+    WKBundleDidRecieveMessageCallback                                   didRecieveMessage;
 };
 typedef struct WKBundleClient WKBundleClient;
 
 WK_EXPORT void WKBundleSetClient(WKBundleRef bundle, WKBundleClient * client);
 
+WK_EXPORT void WKBundlePostMessage(WKBundleRef bundle, WKStringRef message);
+
 #ifdef __cplusplus
 }
 #endif