#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>
const void *clientInfo);
private:
- WKStringRef m_willSendMessage;
WKStringRef m_uriChangedMessage;
WKBundleRef m_bundle;
bool m_encrypted;
WRTDecryptor::ResourceDecryptor *m_resDec;
WrtDB::EncryptedFileList m_encryptedFiles;
+ WrtDB::WidgetType m_widgetType;
// WKBundlePageResourceLoadClient callback
static WKURLRequestRef willSendRequestForFrameCallback(
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);
// 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);