return;
view_->OnGetFocusedNodeBounds(rect);
}
+
+void RenderWidgetHostImpl::SetLongPollingGlobalTimeout(uint64_t timeout) {
+ blink_widget_->SetLongPollingGlobalTimeout(timeout);
+}
#endif
blink::VisualProperties RenderWidgetHostImpl::GetInitialVisualProperties() {
void OnGetContentSnapshot(int request_id, const SkBitmap& bitmap);
void UpdateFocusedNodeBounds();
void OnGetFocusedNodeBounds(const gfx::RectF& rect);
+ void SetLongPollingGlobalTimeout(uint64_t timeout);
#endif
// Returns true if the RenderWidget is hidden.
[EnableIf=is_efl]
UpdateFocusedNodeBounds() => (gfx.mojom.RectF rect);
+ [EnableIf=is_efl]
+ SetLongPollingGlobalTimeout(uint64 timeout);
+
// Informs the widget that it was hidden. This allows it to reduce its
// resource utilization, and will cancel any pending
// RecordContentToVisibleTimeRequest that was set with WasShown or
// onto the specified canvas, when the page is not having any 3D content.
virtual bool PaintSoftBitmap(SkCanvas*, const gfx::Rect&) = 0;
virtual bool HasAcceleratedCanvasWithinViewport() const = 0;
+ virtual void SetLongPollingGlobalTimeout(uint64_t timeout) = 0;
#endif
protected:
}
return false;
}
+
+void WebViewImpl::SetLongPollingGlobalTimeout(uint64_t timeout) {
+ if (!GetPage())
+ return;
+ GetPage()->SetLongPollingGlobalTimeout(timeout);
+}
#endif
} // namespace blink
#if BUILDFLAG(IS_EFL)
bool PaintSoftBitmap(SkCanvas*, const gfx::Rect&) override;
bool HasAcceleratedCanvasWithinViewport() const override;
+ void SetLongPollingGlobalTimeout(uint64_t timeout) override;
#endif
// Functions to add and remove observers for this object.
}
return gfx::RectF();
}
+
+void WebFrameWidgetImpl::SetLongPollingGlobalTimeout(uint64_t timeout) {
+ WebView* view = View();
+ if (view)
+ view->SetLongPollingGlobalTimeout(timeout);
+}
#endif
void WebFrameWidgetImpl::OrientationChanged() {
SkBitmap* snapshot) override;
gfx::RectF UpdateFocusedNodeBounds() override;
+ void SetLongPollingGlobalTimeout(uint64_t timeout) override;
#endif
void OrientationChanged() override;
void DidUpdateSurfaceAndScreen(
}
}
+#if BUILDFLAG(IS_EFL)
+void Page::SetLongPollingGlobalTimeout(uint64_t timeout) {
+ long_polling_global_timeout_ = timeout;
+}
+#endif
+
template class CORE_TEMPLATE_EXPORT Supplement<Page>;
const char InternalSettingsPageSupplementBase::kSupplementName[] =
void OnSetPageFrozen(bool is_frozen) override;
bool LocalMainFrameNetworkIsAlmostIdle() const override;
+#if BUILDFLAG(IS_EFL)
+ void SetLongPollingGlobalTimeout(uint64_t timeout);
+ uint64_t GetLongPollingGlobalTimeout() {
+ return long_polling_global_timeout_;
+ }
+#endif
+
void AddAutoplayFlags(int32_t flags);
void ClearAutoplayFlags();
mojom::blink::TextAutosizerPageInfo web_text_autosizer_page_info_;
WebScopedVirtualTimePauser history_navigation_virtual_time_pauser_;
+#if BUILDFLAG(IS_EFL)
+ uint64_t long_polling_global_timeout_ = 0;
+#endif // IS_EFL
};
extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>;
loader_ = MakeGarbageCollected<ThreadableLoader>(execution_context, this,
resource_loader_options);
+#if defined(USE_EFL)
+ uint64_t timeout_milliseconds_global = 0;
+ auto* document = To<LocalDOMWindow>(GetExecutionContext())->document();
+ if (execution_context.IsWindow() && document && document->GetPage()) {
+ timeout_milliseconds_global =
+ document->GetPage()->GetLongPollingGlobalTimeout() * 1000;
+ }
+
+ uint64_t timeout_to_set = timeout();
+ if (timeout_milliseconds_global > 0 &&
+ timeout_milliseconds_global < timeout_to_set) {
+ timeout_to_set = timeout_milliseconds_global;
+ }
+
+ uint64_t timeout =
+ (timeout_to_set == 0) ? timeout_milliseconds_global : timeout_to_set;
+ loader_->SetTimeout(base::Milliseconds(timeout));
+#else
loader_->SetTimeout(timeout_);
+#endif
base::TimeTicks start_time = base::TimeTicks::Now();
loader_->Start(std::move(request));
UpdateFocusedNodeBoundsCallback callback) {
std::move(callback).Run(client_->UpdateFocusedNodeBounds());
}
+
+void WidgetBase::SetLongPollingGlobalTimeout(uint64_t timeout) {
+ client_->SetLongPollingGlobalTimeout(timeout);
+}
#endif
void WidgetBase::WasHidden() {
void UpdateFocusedNodeBounds(
UpdateFocusedNodeBoundsCallback callback) override;
+ void SetLongPollingGlobalTimeout(uint64_t timeout) override;
#endif
void WasHidden() override;
void WasShown(bool was_evicted,
SkBitmap* snapshot) {}
virtual gfx::RectF UpdateFocusedNodeBounds() { return gfx::RectF(); }
+ virtual void SetLongPollingGlobalTimeout(uint64_t timeout) {}
#endif
// Convert screen coordinates to device emulated coordinates (scaled
callback(evas_object_, manifest, user_data);
}
+void EWebView::SetSessionTimeout(uint64_t timeout) {
+ if (web_contents_->GetPrimaryMainFrame()->IsRenderFrameLive() && rwhva())
+ rwhva()->host()->SetLongPollingGlobalTimeout(timeout);
+}
+
void EWebView::SetExceededIndexedDatabaseQuotaCallback(
Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback,
void* user_data) {
void Suspend();
void Resume();
void Stop();
+ void SetSessionTimeout(uint64_t timeout);
double GetTextZoomFactor() const;
void SetTextZoomFactor(double text_zoom_factor);
double GetPageZoomFactor() const;
void ewk_view_session_timeout_set(Evas_Object* o, unsigned long timeout)
{
- LOG_EWK_API_MOCKUP();
+ EWK_VIEW_IMPL_GET_OR_RETURN(o, impl);
+ impl->SetSessionTimeout(timeout);
}
Evas_Object* ewk_view_widget_get(Evas_Object* view)