#include <EGL/egl.h>
#endif
+#if ENABLE(TIZEN_HW_MORE_BACK_KEY)
+#include <dlfcn.h>
+void* EflAssistHandle = 0;
+#endif
+
using namespace WebCore;
using namespace WebKit;
m_formDatabase->open(FormDatabase::defaultDatabaseDirectoryPath(), FormDatabase::defaultDatabaseFilename());
#endif
#endif
+
+#if ENABLE(TIZEN_HW_MORE_BACK_KEY)
+ if (!EflAssistHandle)
+ EflAssistHandle = dlopen("/usr/lib/libefl-assist.so.0", RTLD_LAZY);
+#endif
}
Ewk_Context::~Ewk_Context()
Ewk_Favicon_Database* Ewk_Context::faviconDatabase()
{
+#if ENABLE(TIZEN_ICON_DATABASE)
+ return 0;
+#endif
if (!m_faviconDatabase) {
WKRetainPtr<WKIconDatabaseRef> iconDatabase = WKContextGetIconDatabase(m_context.get());
// Set the database path if it is not open yet.
WKStringRef wkKey = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkKeys.get(), i));
WKStringRef wkValue = static_cast<WKStringRef>(WKDictionaryGetItemForKey(formData, wkKey));
- int length = WKStringGetMaximumUTF8CStringSize(wkKey);
- if (length <= 0)
- continue;
- OwnArrayPtr<char> keyBuffer = adoptArrayPtr(new char[length]);
- WKStringGetUTF8CString(wkKey, keyBuffer.get(), length);
-
- length = WKStringGetMaximumUTF8CStringSize(wkValue);
- if (length <= 0)
- continue;
- OwnArrayPtr<char> valueBuffer = adoptArrayPtr(new char[length]);
- WKStringGetUTF8CString(wkValue, valueBuffer.get(), length);
- formDataVector.append(pair<String, String>(keyBuffer.get(), valueBuffer.get()));
+ formDataVector.append(pair<String, String>(toImpl(wkKey)->string(), toImpl(wkValue)->string()));
}
m_formDatabase->addFormDataForURL(String::fromUTF8(url), formDataVector, isPasswordForm);
EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
WKRetainPtr<WKSecurityOriginRef> securityOriginRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
Ewk_Context_Callback_Context* context = new Ewk_Context_Callback_Context;
context->webApplicationCacheUsageForOriginCallback = callback;
context->userData = userData;
EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
#if ENABLE(TIZEN_SQL_DATABASE)
EINA_SAFETY_ON_NULL_RETURN_VAL(exceededQuota, 0);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(exceededQuota->origin));
return exceededQuota->origin;
#else
return 0;
EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
Ewk_Context_Callback_Context* context = new Ewk_Context_Callback_Context;
context->webDatabaseQuotaCallback = callback;
context->userData = userData;
EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s) quota(%d)", ewk_security_origin_host_get(origin), quota);
WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
Ewk_Context_Callback_Context* context = new Ewk_Context_Callback_Context;
context->webDatabaseQuotaCallback = callback;
context->userData = userData;
Eina_Bool ewk_context_web_indexed_database_delete_all(Ewk_Context* ewkContext)
{
#if ENABLE(TIZEN_INDEXED_DATABASE)
- EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
-
- TIZEN_LOGI("ewkContext (%p)", ewkContext);
- DEFINE_STATIC_LOCAL(const String, fileMatchPattern, ("*"));
- DEFINE_STATIC_LOCAL(const String, indexedDatabaseDirectory, ("/opt/apps/com.samsung.browser/data/.webkit/indexedDatabases"));
-
- Vector<String> paths = WebCore::listDirectory(indexedDatabaseDirectory, fileMatchPattern);
- Vector<String>::const_iterator end = paths.end();
- for(Vector<String>::const_iterator it = paths.begin(); it != end; ++it){
- String path = *it;
-#if ENABLE(TIZEN_FILE_SYSTEM)
- WebCore::removeDirectory(path);
-#endif
- }
+ WKContextDeleteIndexedDatabaseAll(ewkContext->wkContext());
return true;
#else
EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
WKRetainPtr<WKSecurityOriginRef> securityOriginRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(origin, false);
- TIZEN_LOGI("host (%s)", ewk_security_origin_host_get(origin));
Ewk_Context_Callback_Context* context = new Ewk_Context_Callback_Context;
context->webStorageUsageCallback = callback;
context->userData = userData;
if (!context->setCertificateFile(certificateFile))
return true;
- if (!fileExists(WTF::String::fromUTF8(certificateFile)))
- LOG_ERROR("[Network] ewk_context_certificate_file_set certificateFile does not exist!\n");
+ if (fileExists(WTF::String::fromUTF8(certificateFile))) {
+ long long fileSize = -1;
+ getFileSize(WTF::String::fromUTF8(certificateFile), fileSize);
+ TIZEN_LOGE("[Network] ewk_context_certificate_file_set certificateFile fileSize [%lld]\n", fileSize);
+ } else
+ TIZEN_LOGE("[Network] ewk_context_certificate_file_set certificateFile does not exist!\n");
WKRetainPtr<WKStringRef> certificateFileRef(AdoptWK, WKStringCreateWithUTF8CString(certificateFile));
WKContextSetCertificateFile(context->wkContext(), certificateFileRef.get());