evas_object_smart_callback_del_full(m_ewkView, "load,provisional,started", __load_provisional_started, this);
evas_object_smart_callback_del_full(m_ewkView, "load,provisional,redirect", __load_provisional_redirect, this);
- evas_object_smart_callback_del_full(m_ewkView, "contextmenu,customize", __contextmenu_customize_cb,this);
+ evas_object_smart_callback_del_full(m_ewkView, "contextmenu,customize", __contextmenu_customize_cb, this);
evas_object_smart_callback_del_full(m_ewkView, "contextmenu,selected", __contextmenu_selected_cb, this);
evas_object_smart_callback_del_full(m_ewkView, "fullscreen,enterfullscreen", __fullscreen_enter_cb, this);
evas_object_smart_callback_del_full(m_ewkView, "fullscreen,exitfullscreen", __fullscreen_exit_cb, this);
+ "&icon=" + std::string(text = curl_easy_escape(curl, s_icon.c_str(), s_icon.length()));
curl_free(text);
retVal += "&name=" + s_name
- + "&uri=" + std::string(text = curl_easy_escape(curl,m_manifestData.start_url.c_str(),
+ + "&uri=" + std::string(text = curl_easy_escape(curl, m_manifestData.start_url.c_str(),
m_manifestData.start_url.length()));
curl_free(text);
retVal += "&pwa_shortName=" + m_manifestData.short_name
if (m_loadError) {
m_loadError = false;
ewk_view_url_set(m_ewkView, ewk_view_url_get(m_ewkView));
- } else
+ } else {
ewk_view_reload(m_ewkView);
+ }
}
void WebView::back(void)
Ewk_Certificate_Policy_Decision *request = m_confirmationCertificatenMap[cert];
Eina_Bool result;
- if (cert->getResult() == WebConfirmation::ConfirmationResult::Confirmed)
+ if (cert->getResult() == WebConfirmation::ConfirmationResult::Confirmed) {
result = EINA_TRUE;
- else if (cert->getResult() == WebConfirmation::ConfirmationResult::Rejected)
+ }
+ else if (cert->getResult() == WebConfirmation::ConfirmationResult::Rejected) {
result = EINA_FALSE;
+ }
else {
BROWSER_LOGE("Wrong ConfirmationResult");
return;
BROWSER_LOGD("[%s:%d] ewk_view_screenshot_contents_get_async API failed", __func__, __LINE__);
} else {
Evas_Object *snapshot = ewk_view_screenshot_contents_get(m_ewkView, area, scale, evas_object_evas_get(m_ewkView));
- BROWSER_LOGD("[%s:%d] Snapshot (screenshot) catched, evas pointer: %p",__func__, __LINE__, snapshot);
+ BROWSER_LOGD("[%s:%d] Snapshot (screenshot) catched, evas pointer: %p", __func__, __LINE__, snapshot);
if (snapshot)
return std::make_shared<tools::BrowserImage>(snapshot);
}
} else {
BROWSER_LOGW("No manifest for webview!");
- std::string uri=self->getURI();
- shortcut_add_to_home(self->m_title.c_str(), LAUNCH_BY_URI, uri.c_str(),nullptr, 0, result_cb, nullptr);
+ std::string uri = self->getURI();
+ shortcut_add_to_home(self->m_title.c_str(), LAUNCH_BY_URI, uri.c_str(), nullptr, 0, result_cb, nullptr);
}
} else {
BROWSER_LOGW("No View or data!");
BROWSER_LOGD("[%s:%d] emiting signal ", __PRETTY_FUNCTION__, __LINE__);
int errorCode = ewk_error_code_get(error);
- if(errorCode == EWK_ERROR_NETWORK_STATUS_CANCELLED)
- {
+ if (errorCode == EWK_ERROR_NETWORK_STATUS_CANCELLED) {
BROWSER_LOGD("Stop signal emitted");
BROWSER_LOGD("Error description: %s", ewk_error_description_get(error));
evas_object_smart_callback_call(obj, "load,stop", nullptr);
}
- else
- {
+ else {
self->loadError();
- self->m_loadError=true;
+ self->m_loadError = true;
}
}
if (data) {
auto *self = static_cast<WebView *>(data);
self->focusWebView();
- } else
+ } else {
BROWSER_LOGW("[%s] data = nullptr", __PRETTY_FUNCTION__);
+ }
}
#endif
if(data)
{
WebView * self = static_cast<WebView *>(data);
- Evas_Object * favicon = ewk_context_icon_database_icon_object_add(self->m_ewkContext, ewk_view_url_get(self->m_ewkView),evas_object_evas_get(self->m_ewkView));
+ Evas_Object * favicon = ewk_context_icon_database_icon_object_add(self->m_ewkContext, ewk_view_url_get(self->m_ewkView), evas_object_evas_get(self->m_ewkView));
if (favicon) {
BROWSER_LOGD("[%s:%d] Favicon received", __PRETTY_FUNCTION__, __LINE__);
self->m_faviconImage = std::make_shared<tools::BrowserImage>(favicon);
case EWK_POLICY_DECISION_DOWNLOAD: {
BROWSER_LOGD("[%s:%d] policy_download", __PRETTY_FUNCTION__, __LINE__);
- evas_object_smart_callback_call(wv->m_ewkView, "close,window", nullptr);
const char *uri = ewk_policy_decision_url_get(policy_decision);
const char *content_type = ewk_policy_decision_response_mime_get(policy_decision);
const Eina_Hash *headers = ewk_policy_decision_response_headers_get(policy_decision);
app_control_h app_control = nullptr;
if (app_control_create(&app_control) < 0) {
BROWSER_LOGE("[%s:%d] Fail to app_control_create", __PRETTY_FUNCTION__, __LINE__);
+ //evas_object_smart_callback_call(wv->m_ewkView, "close,window", nullptr);
return;
}
if (app_control_set_operation(app_control, APP_CONTROL_OPERATION_VIEW) < 0) {
BROWSER_LOGE("[%s:%d] Fail to app_control_set_operation", __PRETTY_FUNCTION__, __LINE__);
+ //evas_object_smart_callback_call(wv->m_ewkView, "close,window", nullptr);
app_control_destroy(app_control);
return;
}
BROWSER_LOGD("[%s:%d] uri: %s", __PRETTY_FUNCTION__, __LINE__, uri);
if (app_control_set_uri(app_control, uri) < 0) {
BROWSER_LOGE("[%s:%d] Fail to app_control_set_uri", __PRETTY_FUNCTION__, __LINE__);
+ //evas_object_smart_callback_call(wv->m_ewkView, "close,window", nullptr);
app_control_destroy(app_control);
return;
}
BROWSER_LOGD("[%s:%d] content_type: %s", __PRETTY_FUNCTION__, __LINE__, content_type);
if (app_control_set_mime(app_control, content_type) < 0) {
BROWSER_LOGE("[%s:%d] Fail to app_control_set_mime", __PRETTY_FUNCTION__, __LINE__);
- app_control_destroy(app_control);
+ //evas_object_smart_callback_call(wv->m_ewkView, "close,window", nullptr);
+ app_control_destroy(app_control);
return;
}
wv->m_downloadControl->handle_download_request(uri, content_type);
app_control_destroy(app_control);
ewk_policy_decision_ignore(policy_decision);
+ //evas_object_smart_callback_call(wv->m_ewkView, "close,window", nullptr);
break;
}
}
app_control_destroy(app_control);
ewk_policy_decision_ignore(policy_decision);
+ //evas_object_smart_callback_call(wv->m_ewkView, "close,window", nullptr);
break;
}
case EWK_POLICY_DECISION_IGNORE: