2019-11-26 20:04:19 +01:00
|
|
|
diff --git content/browser/renderer_host/input/fling_scheduler.cc content/browser/renderer_host/input/fling_scheduler.cc
|
2023-02-27 19:52:38 +01:00
|
|
|
index 431df5d50debe..0fcc9ea8fbb1a 100644
|
2019-11-26 20:04:19 +01:00
|
|
|
--- content/browser/renderer_host/input/fling_scheduler.cc
|
|
|
|
+++ content/browser/renderer_host/input/fling_scheduler.cc
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -68,6 +68,9 @@ void FlingScheduler::ProgressFlingOnBeginFrameIfneeded(
|
2019-11-26 20:04:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ui::Compositor* FlingScheduler::GetCompositor() {
|
|
|
|
+ if (compositor_) {
|
|
|
|
+ return compositor_;
|
|
|
|
+ }
|
2023-02-27 19:52:38 +01:00
|
|
|
if (!host_->GetView()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2019-11-26 20:04:19 +01:00
|
|
|
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
|
2024-05-23 03:52:35 +02:00
|
|
|
index 7fba410705048..7ce1d8a5eeb7f 100644
|
2019-11-26 20:04:19 +01:00
|
|
|
--- content/browser/renderer_host/render_widget_host_impl.cc
|
|
|
|
+++ content/browser/renderer_host/render_widget_host_impl.cc
|
2024-05-23 03:52:35 +02:00
|
|
|
@@ -3292,6 +3292,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
2020-06-09 19:48:00 +02:00
|
|
|
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
|
2019-11-26 20:04:19 +01:00
|
|
|
}
|
|
|
|
|
2024-03-19 22:11:42 +01:00
|
|
|
+void RenderWidgetHostImpl::SetCompositorForFlingScheduler(
|
|
|
|
+ ui::Compositor* compositor) {
|
|
|
|
+ GetRenderInputRouter()->fling_scheduler()->SetCompositor(compositor);
|
2019-11-26 20:04:19 +01:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
void RenderWidgetHostImpl::AddPendingUserActivation(
|
|
|
|
const WebInputEvent& event) {
|
2020-03-04 01:29:39 +01:00
|
|
|
if ((base::FeatureList::IsEnabled(
|
2019-11-26 20:04:19 +01:00
|
|
|
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
|
2024-05-23 03:52:35 +02:00
|
|
|
index dee4fb6b79285..fd3eaef2b6972 100644
|
2019-11-26 20:04:19 +01:00
|
|
|
--- content/browser/renderer_host/render_widget_host_impl.h
|
|
|
|
+++ content/browser/renderer_host/render_widget_host_impl.h
|
2024-05-23 03:52:35 +02:00
|
|
|
@@ -811,6 +811,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
2020-03-04 01:29:39 +01:00
|
|
|
|
2019-11-26 20:04:19 +01:00
|
|
|
void ProgressFlingIfNeeded(base::TimeTicks current_time);
|
|
|
|
void StopFling();
|
|
|
|
+ void SetCompositorForFlingScheduler(ui::Compositor* compositor);
|
|
|
|
|
2024-01-26 03:12:43 +01:00
|
|
|
RenderWidgetHostViewBase* GetRenderWidgetHostViewBase();
|
|
|
|
|
2023-12-06 21:16:15 +01:00
|
|
|
diff --git content/common/input/fling_scheduler_base.h content/common/input/fling_scheduler_base.h
|
2024-05-11 17:23:56 +02:00
|
|
|
index e8ee63f3abc2e..765ea358e093a 100644
|
2023-12-06 21:16:15 +01:00
|
|
|
--- content/common/input/fling_scheduler_base.h
|
|
|
|
+++ content/common/input/fling_scheduler_base.h
|
2024-05-11 17:23:56 +02:00
|
|
|
@@ -5,14 +5,26 @@
|
|
|
|
#ifndef CONTENT_COMMON_INPUT_FLING_SCHEDULER_BASE_H_
|
|
|
|
#define CONTENT_COMMON_INPUT_FLING_SCHEDULER_BASE_H_
|
2023-12-06 21:16:15 +01:00
|
|
|
|
2024-05-11 17:23:56 +02:00
|
|
|
+#include "base/memory/raw_ptr.h"
|
2023-12-06 21:16:15 +01:00
|
|
|
#include "content/common/input/fling_controller.h"
|
|
|
|
|
|
|
|
+namespace ui {
|
|
|
|
+class Compositor;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
namespace content {
|
|
|
|
|
|
|
|
class FlingSchedulerBase : public FlingControllerSchedulerClient {
|
|
|
|
public:
|
|
|
|
virtual void ProgressFlingOnBeginFrameIfneeded(
|
|
|
|
base::TimeTicks current_time) = 0;
|
|
|
|
+
|
|
|
|
+ void SetCompositor(ui::Compositor* compositor) {
|
|
|
|
+ compositor_ = compositor;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+protected:
|
2024-05-11 17:23:56 +02:00
|
|
|
+ raw_ptr<ui::Compositor> compositor_ = nullptr;
|
2023-12-06 21:16:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace content
|
2024-03-19 22:11:42 +01:00
|
|
|
diff --git content/common/input/render_input_router.h content/common/input/render_input_router.h
|
2024-05-23 03:52:35 +02:00
|
|
|
index cab10100a369d..d8f3be04bfeba 100644
|
2024-03-19 22:11:42 +01:00
|
|
|
--- content/common/input/render_input_router.h
|
|
|
|
+++ content/common/input/render_input_router.h
|
2024-05-23 03:52:35 +02:00
|
|
|
@@ -61,6 +61,7 @@ class CONTENT_EXPORT RenderInputRouter : public InputRouterImplClient {
|
2024-03-19 22:11:42 +01:00
|
|
|
|
|
|
|
InputRouter* input_router() { return input_router_.get(); }
|
2024-04-23 22:06:00 +02:00
|
|
|
RenderInputRouterDelegate* delegate() { return delegate_; }
|
2024-03-19 22:11:42 +01:00
|
|
|
+ FlingSchedulerBase* fling_scheduler() { return fling_scheduler_.get(); }
|
|
|
|
|
|
|
|
void SetForceEnableZoom(bool);
|
|
|
|
void SetDeviceScaleFactor(float device_scale_factor);
|