void Browser_Settings_Website_Setting::__delete_all_website_list_confirm_response_cb(void *data, Evas_Object *obj, void *event_info)
{
	BROWSER_LOGD("[%s]", __func__);
	if (!data)
		return;

	Browser_Settings_Website_Setting *website_setting = (Browser_Settings_Website_Setting *)data;
	if (website_setting->m_delete_all_website_list_confirm_popup) {
		evas_object_del(website_setting->m_delete_all_website_list_confirm_popup);
		website_setting->m_delete_all_website_list_confirm_popup = NULL;
	}

	/* Clear Geolocation */
	Browser_Geolocation_DB geolocation_db;
	geolocation_db.remove_all_geolocation_data();
	/* Clear cache */
	Ewk_Context *ewk_context = ewk_context_default_get();
	ewk_context_cache_clear(ewk_context);
	ewk_context_web_indexed_database_delete_all(ewk_context);
	ewk_context_application_cache_delete_all(ewk_context);
	ewk_context_web_storage_delete_all(ewk_context);
	ewk_context_web_database_delete_all(ewk_context);

	website_setting->_refresh_website_list();

	website_setting->show_notify_popup(BR_STRING_DELETED, 3, EINA_TRUE);
}
void Browser_Settings_Website_Setting::__clear_web_storage_confirm_response_cb(void *data, Evas_Object *obj, void *event_info)
{
	BROWSER_LOGD("[%s]", __func__);
	if (!data)
		return;

	Browser_Settings_Website_Setting *website_setting = (Browser_Settings_Website_Setting *)data;
	if (website_setting->m_clear_confirm_popup) {
		evas_object_del(website_setting->m_clear_confirm_popup);
		website_setting->m_clear_confirm_popup = NULL;
	}

	/* Clear cache */
	Ewk_Context *ewk_context = ewk_context_default_get();
	ewk_context_application_cache_delete(ewk_context, (Ewk_Security_Origin*)(website_setting->m_current_item_data->origin));
	ewk_context_web_database_delete(ewk_context, (Ewk_Security_Origin*)(website_setting->m_current_item_data->origin));
	ewk_context_web_storage_origin_delete(ewk_context, (Ewk_Security_Origin*)(website_setting->m_current_item_data->origin));
	website_setting->m_current_item_data->storage = false;

	if(website_setting->m_current_item_data->geolocation == false) {
		website_setting->__back_button_clicked_cb(NULL, NULL, NULL);
		website_setting->_refresh_website_list();
	} else
		website_setting->_refresh_details_list(website_setting->m_current_item_data);

	website_setting->show_notify_popup(BR_STRING_DELETED, 3, EINA_TRUE);
}
Example #3
0
void PageClientImpl::handleDownloadRequest(DownloadProxy* download)
{
    Ewk_Download_Job* ewkDownload = ewk_download_job_new(download, m_viewWidget);
    // For now we only support one default context, but once we support
    // multiple contexts, we will need to retrieve the context from the
    // view.
    ewk_context_download_job_add(ewk_context_default_get(), ewkDownload);
    ewk_download_job_unref(ewkDownload);
}
Example #4
0
void EWK2UnitTestBase::SetUp()
{
    ewk_init();

    unsigned int width = environment->defaultWidth();
    unsigned int height = environment->defaultHeight();

    m_ecoreEvas = ecore_evas_new(0, 0, 0, width, height, 0);

    ecore_evas_show(m_ecoreEvas);
    Evas* evas = ecore_evas_get(m_ecoreEvas);

    Evas_Smart* smart = evas_smart_class_new(&m_ewkViewClass.sc);
    m_webView = ewk_view_smart_add(evas, smart, ewk_context_default_get());
    ewk_view_theme_set(m_webView, environment->defaultTheme());

    evas_object_resize(m_webView, width, height);
    evas_object_show(m_webView);
    evas_object_focus_set(m_webView, true);
}