return impl_->evas_object();
}
-} // namespace wrt
+void WebView::SetAppInfo(const std::string& app_name,
+ const std::string& version) {
+ impl_->SetAppInfo(app_name, version);
+}
+void WebView::SetUserAgent(const std::string& user_agent) {
+ impl_->SetUserAgent(user_agent.c_str());
+}
+} // namespace wrt
void Reload();
void SetVisibility(bool show);
bool EvalJavascript(const std::string& script);
+ void SetAppInfo(const std::string& app_name, const std::string& version);
+ void SetUserAgent(const std::string& user_agent);
void SetEventListener(EventListener* listener);
Evas_Object* evas_object() const;
listener_ = listener;
}
-} // namespace wrt
-
+void WebViewImpl::SetAppInfo(const std::string& app_name,
+ const std::string& version) {
+ std::string ua = app_name + "/" + version;
+ ewk_view_application_name_for_user_agent_set(ewk_view_, ua.c_str());
+}
+void WebViewImpl::SetUserAgent(const std::string& user_agent) {
+ ewk_view_user_agent_set(ewk_view_, user_agent.c_str());
+}
+} // namespace wrt
void Reload();
void SetVisibility(bool show);
bool EvalJavascript(const std::string& script);
+ void SetAppInfo(const std::string& app_name, const std::string& version);
+ void SetUserAgent(const std::string& user_agent);
void SetEventListener(WebView::EventListener* listener);
Evas_Object* evas_object() const;