Evas_Object* /*object*/,
void* event_info) {
auto view = static_cast<EWebView*>(user_data);
+ if (!view->GetSelectionController()) {
+ return;
+ }
auto rect = static_cast<Eina_Rectangle*>(event_info);
view->GetSelectionController()->SetCustomVisibleViewRect(
gfx::Rect(rect->x, rect->y, rect->w, rect->h));
rwhi->SetFloatVideoWindowState(enabled);
}
+
+void EWebView::SuspendNetworkLoading() {
+ RenderWidgetHostImpl* rwhi = static_cast<RenderWidgetHostImpl*>(
+ web_contents_->GetRenderViewHost()->GetWidget());
+
+ rwhi->SuspendNetworkLoading();
+}
+
+void EWebView::ResumeNetworkLoading() {
+ RenderWidgetHostImpl* rwhi = static_cast<RenderWidgetHostImpl*>(
+ web_contents_->GetRenderViewHost()->GetWidget());
+
+ rwhi->ResumeNetworkLoading();
+}
#endif // IS_TIZEN_TV
double EWebView::GetTextZoomFactor() const {
#endif
void EWebView::SetOrientation(int orientation) {
+ LOG(INFO) << "New ori " << orientation << " GetOrientation "
+ << GetOrientation();
if (GetOrientation() == orientation)
return;
+ SetRotationChanged(true);
if (orientation == 0 || orientation == 90 || orientation == 180 ||
orientation == 270) {
#if !defined(USE_AURA)
GetWebContentsViewEfl()->SetOrientation(orientation);
+#else
+#if BUILDFLAG(IS_TIZEN)
+ TRACE_EVENT2("viz", "EWebView::SetOrientation", "orientation", orientation,
+ "this", (void*)this);
+ wcva()->SetOrientation(orientation);
+#endif
#endif
int width = 0;
int height = 0;
#if !defined(USE_AURA)
return GetWebContentsViewEfl()->GetOrientation();
#else
+#if BUILDFLAG(IS_TIZEN)
+ return wcva()->GetOrientation();
+#else
return 0;
#endif
+#endif
}
void EWebView::Show() {
}
// Remove below code while ewk_error_cancellation_get has been implemented.
-const char* EWebView::InvokeViewLoadErrorPageCallback(
- const GURL& url,
- int error_code,
- const std::string& error_description) {
- std::unique_ptr<_Ewk_Error> err(
- new _Ewk_Error(error_code, url.possibly_invalid_spec().c_str(),
- error_description.c_str()));
+const char* EWebView::InvokeViewLoadErrorPageCallback(const GURL& url,
+ int error_code,
+ bool is_cancellation) {
+ std::unique_ptr<_Ewk_Error> err(new _Ewk_Error(
+ error_code, is_cancellation, url.possibly_invalid_spec().c_str()));
_Ewk_Error_Page error_page;
LOG(INFO) << "EWebView::InvokeLoadErrorPageCallback url: "
}
void EWebView::SelectFocusedLink() {
+ if (!rwhva()) {
+ return;
+ }
+
rwhva()->host()->SelectFocusedLink();
}
}
#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+void EWebView::InvokeScrollbarThumbFocusChangedCallback(
+ Ewk_Scrollbar_Orientation orientation,
+ bool focused) {
+ Ewk_Scrollbar_Data data;
+ data.orientation = orientation;
+ data.focused = focused;
+ SmartCallback<EWebViewCallbacks::DidChagneScrollbarsThumbFocus>().call(&data);
+}
+#endif
+
void EWebView::HandleRendererProcessCrash() {
content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
base::BindOnce(&EWebView::InvokeWebProcessCrashedCallback,
return;
}
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (pending_setfocus_closure_)
+ std::move(pending_setfocus_closure_).Run();
+#endif
+
for (auto iter = delayed_messages_.begin(); iter != delayed_messages_.end();
++iter) {
IPC::Message* message = *iter;