view->LoadUrl(res->uri(), res->mime());
view_stack_.push_front(view);
+#ifdef PROFILE_WEARABLE
+ // ewk_view_bg_color_set is not working at webview initialization.
+ if (app_data_->app_type() == common::ApplicationData::WATCH) {
+ view->SetBGColor(0, 0, 0, 255);
+ } else {
+ view->SetBGColor(0, 0, 0, 0);
+ }
+#endif // PROFILE_WEARABLE
+
if (appcontrol->data(AUL_K_DEBUG) == "1") {
debug_mode_ = true;
LaunchInspector(appcontrol.get());
impl_->SetDefaultEncoding(encoding);
}
+#ifdef PROFILE_WEARABLE
+void WebView::SetBGColor(int r, int g, int b, int a) {
+ impl_->SetBGColor(r, g, b, a);
+}
+#endif // PROFILE_WEARABLE
+
} // namespace runtime
bool SetUserAgent(const std::string& user_agent);
void SetCSPRule(const std::string& rule, bool report_only);
void SetDefaultEncoding(const std::string& encoding);
+#ifdef PROFILE_WEARABLE
+ void SetBGColor(int r, int g, int b, int a);
+#endif
void SetEventListener(EventListener* listener);
Evas_Object* evas_object() const;
}
}
+#ifdef PROFILE_WEARABLE
+void WebViewImpl::SetBGColor(int r, int g, int b, int a) {
+ ewk_view_bg_color_set(ewk_view_, r, g, b, a);
+}
+#endif
+
} // namespace runtime
bool SetUserAgent(const std::string& user_agent);
void SetCSPRule(const std::string& rule, bool report_only);
void SetDefaultEncoding(const std::string& encoding);
+#ifdef PROFILE_WEARABLE
+ void SetBGColor(int r, int g, int b, int a);
+#endif
void SetEventListener(WebView::EventListener* listener);
Evas_Object* evas_object() const;