impl_->SetCSPRule(rule, report_only);
}
+void WebView::SetDefaultEncoding(const std::string& encoding) {
+ impl_->SetDefaultEncoding(encoding);
+}
+
} // namespace wrt
void SetAppInfo(const std::string& app_name, const std::string& version);
bool SetUserAgent(const std::string& user_agent);
void SetCSPRule(const std::string& rule, bool report_only);
+ void SetDefaultEncoding(const std::string& encoding);
void SetEventListener(EventListener* listener);
Evas_Object* evas_object() const;
// TODO(sngn.lee) : It should be declare in common header
const char* kKeyNameBack = "back";
const char* kKeyNameMenu = "menu";
+const char* kDefaultEncoding = "UTF-8";
static int ToWebRotation(int r) {
switch (r) {
Ewk_Settings* settings = ewk_view_settings_get(ewk_view_);
ewk_settings_scripts_can_open_windows_set(settings, EINA_TRUE);
+ ewk_settings_default_text_encoding_name_set(settings, kDefaultEncoding);
// TODO(sngn.lee): "protocolhandler,registration,requested"
// custom protocol handler
report_only ? EWK_REPORT_ONLY : EWK_ENFORCE_POLICY);
}
+void WebViewImpl::SetDefaultEncoding(const std::string& encoding) {
+ if (ewk_settings_is_encoding_valid(encoding.c_str())) {
+ Ewk_Settings* settings = ewk_view_settings_get(ewk_view_);
+ ewk_settings_default_text_encoding_name_set(settings, encoding.c_str());
+ }
+}
} // namespace wrt
void SetAppInfo(const std::string& app_name, const std::string& version);
bool SetUserAgent(const std::string& user_agent);
void SetCSPRule(const std::string& rule, bool report_only);
+ void SetDefaultEncoding(const std::string& encoding);
void SetEventListener(WebView::EventListener* listener);
Evas_Object* evas_object() const;