refactor: CursorManager moved to //components/input

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5613297
This commit is contained in:
Samuel Attard
2024-06-27 10:54:22 -07:00
parent 8b9caa3f10
commit ba573b1101
2 changed files with 6 additions and 6 deletions

View File

@@ -16,6 +16,7 @@
#include "base/memory/raw_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "components/input/cursor_manager.h"
#include "components/viz/common/features.h"
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
@@ -23,7 +24,6 @@
#include "components/viz/common/quads/compositor_render_pass.h"
#include "content/browser/renderer_host/render_widget_host_delegate.h" // nogncheck
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" // nogncheck
#include "content/common/input/cursor_manager.h"
#include "content/common/input/synthetic_gesture.h" // nogncheck
#include "content/common/input/synthetic_gesture_target.h"
#include "content/public/browser/browser_task_traits.h"
@@ -197,7 +197,7 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
AllocateFrameSinkId(),
delegated_frame_host_client_.get(),
true /* should_register_frame_sink_id */)},
cursor_manager_(std::make_unique<content::CursorManager>(this)),
cursor_manager_(std::make_unique<input::CursorManager>(this)),
mouse_wheel_phase_handler_(this),
backing_(std::make_unique<SkBitmap>()) {
DCHECK(render_widget_host_);
@@ -449,7 +449,7 @@ void OffScreenRenderWidgetHostView::InitAsPopup(
void OffScreenRenderWidgetHostView::UpdateCursor(const ui::Cursor&) {}
content::CursorManager* OffScreenRenderWidgetHostView::GetCursorManager() {
input::CursorManager* OffScreenRenderWidgetHostView::GetCursorManager() {
return cursor_manager_.get();
}

View File

@@ -44,7 +44,7 @@
#include "ui/gfx/win/window_impl.h"
#endif
namespace content {
namespace input {
class CursorManager;
}
@@ -136,7 +136,7 @@ class OffScreenRenderWidgetHostView
void ShowWithVisibility(content::PageVisibilityState page_visibility) final;
void Destroy(void) override;
void UpdateTooltipUnderCursor(const std::u16string&) override;
content::CursorManager* GetCursorManager() override;
input::CursorManager* GetCursorManager() override;
void CopyFromSurface(
const gfx::Rect& src_rect,
const gfx::Size& output_size,
@@ -304,7 +304,7 @@ class OffScreenRenderWidgetHostView
// depends-on: delegated_frame_host_client_
const std::unique_ptr<content::DelegatedFrameHost> delegated_frame_host_;
std::unique_ptr<content::CursorManager> cursor_manager_;
std::unique_ptr<input::CursorManager> cursor_manager_;
raw_ptr<OffScreenHostDisplayClient> host_display_client_;
std::unique_ptr<OffScreenVideoConsumer> video_consumer_;