return true;
}
+void EWebView::SetDoNotTrack(Eina_Bool enable) {
+ // enable: 0 User tend to allow tracking on the target site.
+ // enable: 1 User tend to not be tracked on the target site.
+ if (web_contents_->GetMutableRendererPrefs()->enable_do_not_track == enable)
+ return;
+
+ // Set navigator.doNotTrack attribute
+ web_contents_->GetMutableRendererPrefs()->enable_do_not_track = enable;
+ web_contents_->SyncRendererPrefs();
+
+ // Set or remove DNT HTTP header, the effects will depend on design of target
+ // site.
+ if (!context())
+ return;
+
+ if (enable)
+ context()->HTTPCustomHeaderAdd("DNT", "1");
+ else
+ context()->HTTPCustomHeaderRemove("DNT");
+}
+
#if defined(TIZEN_ATK_SUPPORT)
void EWebView::UpdateSpatialNavigationStatus(Eina_Bool enable) {
if (settings_->getPreferences().spatial_navigation_enabled == enable)
const gfx::Vector2dF& latest_overscroll_delta);
bool SetVisibility(bool enable);
+ void SetDoNotTrack(Eina_Bool);
#if defined(TIZEN_ATK_SUPPORT)
void UpdateSpatialNavigationStatus(Eina_Bool enable);
return EINA_FALSE;
}
+Eina_Bool ewk_settings_do_not_track_set(Ewk_Settings* settings, Eina_Bool enabled)
+{
+ EWK_VIEW_IMPL_GET_OR_RETURN(
+ const_cast<Ewk_Settings*>(settings)->getEvasObject(), webview,
+ EINA_FALSE);
+ LOG(INFO) << "set do not track : " << enabled;
+ webview->SetDoNotTrack(enabled);
+ return EINA_TRUE;
+}
+
Eina_Bool ewk_settings_viewport_meta_tag_set(Ewk_Settings* settings, Eina_Bool enable)
{
LOG_EWK_API_MOCKUP();