update wrt_0.8.107
[platform/framework/web/wrt.git] / src / view / webkit / bundles / wrt-wk2-bundle.h
index 02ba37c..53dd8d1 100644 (file)
@@ -27,6 +27,7 @@
 #include <string>
 #include <WKBundle.h>
 #include <WKPageLoadTypes.h>
+#include <WKBundlePage.h>
 #include <dpl/string.h>
 #include <dpl/encryption/resource_decryption.h>
 #include <dpl/wrt-dao-ro/widget_dao_read_only.h>
@@ -56,7 +57,6 @@ class Bundle {
             const void *clientInfo);
 
   private:
-    WKStringRef m_willSendMessage;
     WKStringRef m_uriChangedMessage;
     WKBundleRef m_bundle;
 
@@ -75,6 +75,7 @@ class Bundle {
     bool m_encrypted;
     WRTDecryptor::ResourceDecryptor *m_resDec;
     WrtDB::EncryptedFileList m_encryptedFiles;
+    WrtDB::WidgetType m_widgetType;
 
     // WKBundlePageResourceLoadClient callback
     static WKURLRequestRef willSendRequestForFrameCallback(
@@ -111,6 +112,24 @@ class Bundle {
             WKTypeRef*,
             const void *clientInfo);
 
+    // WKBundlePageDecidePolicyForNavigationActionCallback
+    static WKBundlePagePolicyAction pageDecidePolicyForNavigationActionCallback(
+            WKBundlePageRef page,
+            WKBundleFrameRef frame,
+            WKBundleNavigationActionRef navigationAction,
+            WKURLRequestRef request,
+            WKTypeRef* userData,
+            const void* clientInfo);
+
+    // WKBundlePageDecidePolicyForResponseCallback
+    static WKBundlePagePolicyAction pageDecidePolicyForResponseCallback(
+        WKBundlePageRef page,
+        WKBundleFrameRef frame,
+        WKURLResponseRef response,
+        WKURLRequestRef request,
+        WKTypeRef* userData,
+        const void* clientInfo);
+
     // WKBundleClient
     void didCreatePage(WKBundlePageRef page);
     void willDestroyPage(WKBundlePageRef page);
@@ -120,12 +139,19 @@ class Bundle {
 
     // WKBundlePageResourceLoadClient
     WKURLRequestRef willSendRequestForFrame(WKURLRequestRef request);
+    WKBundlePagePolicyAction pageDecidePolicyForNavigationAction(
+        WKBundlePageRef             page,
+        WKBundleFrameRef            frame,
+        WKBundleNavigationActionRef navigationAction,
+        WKURLRequestRef             request,
+        WKTypeRef*                  userData);
 
     // basic
     static std::string toString(WKStringRef str);
     static std::string toString(WKURLRef url);
     static std::string toString(WKURLRequestRef req);
     static std::string toString(WKErrorRef err);
+    static std::string getScheme(std::string uri);
 
     bool isEncryptedResource(std::string Url, int &size);
     std::string DecryptResource(std::string resource, int size);