diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index db17e48457..6b62ae3c5a 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -306,8 +306,6 @@ ui::TextInputClient* OffScreenRenderWidgetHostView::GetTextInputClient() { return nullptr; } -void OffScreenRenderWidgetHostView::Focus() {} - bool OffScreenRenderWidgetHostView::HasFocus() { return false; } @@ -377,14 +375,10 @@ std::optional OffScreenRenderWidgetHostView::GetBackgroundColor() { return background_color_; } -void OffScreenRenderWidgetHostView::UpdateBackgroundColor() {} - gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() { return size_; } -void OffScreenRenderWidgetHostView::SetInsets(const gfx::Insets& insets) {} - blink::mojom::PointerLockResult OffScreenRenderWidgetHostView::LockPointer( bool request_unadjusted_movement) { return blink::mojom::PointerLockResult::kUnsupportedOptions; @@ -396,8 +390,6 @@ OffScreenRenderWidgetHostView::ChangePointerLock( return blink::mojom::PointerLockResult::kUnsupportedOptions; } -void OffScreenRenderWidgetHostView::UnlockPointer() {} - void OffScreenRenderWidgetHostView::TakeFallbackContentFrom( content::RenderWidgetHostView* view) { DCHECK(!static_cast(view) @@ -447,19 +439,10 @@ void OffScreenRenderWidgetHostView::InitAsPopup( Show(); } -void OffScreenRenderWidgetHostView::UpdateCursor(const ui::Cursor&) {} - input::CursorManager* OffScreenRenderWidgetHostView::GetCursorManager() { return cursor_manager_.get(); } -void OffScreenRenderWidgetHostView::SetIsLoading(bool loading) {} - -void OffScreenRenderWidgetHostView::TextInputStateChanged( - const ui::mojom::TextInputState& params) {} - -void OffScreenRenderWidgetHostView::ImeCancelComposition() {} - void OffScreenRenderWidgetHostView::RenderProcessGone() { Destroy(); } @@ -492,9 +475,6 @@ void OffScreenRenderWidgetHostView::Destroy() { delete this; } -void OffScreenRenderWidgetHostView::UpdateTooltipUnderCursor( - const std::u16string&) {} - uint32_t OffScreenRenderWidgetHostView::GetCaptureSequenceNumber() const { return latest_capture_sequence_number_; } @@ -520,9 +500,6 @@ display::ScreenInfo OffScreenRenderWidgetHostView::GetScreenInfo() const { return screen_info; } -void OffScreenRenderWidgetHostView::TransformPointToRootSurface( - gfx::PointF* point) {} - gfx::Rect OffScreenRenderWidgetHostView::GetBoundsInRootWindow() { return gfx::Rect(size_); } @@ -532,9 +509,6 @@ OffScreenRenderWidgetHostView::GetDisplayFeature() { return std::nullopt; } -void OffScreenRenderWidgetHostView::SetDisplayFeatureForTesting( - const content::DisplayFeature* display_feature) {} - viz::SurfaceId OffScreenRenderWidgetHostView::GetCurrentSurfaceId() const { return delegated_frame_host() ? delegated_frame_host()->GetCurrentSurfaceId() : viz::SurfaceId(); @@ -546,11 +520,6 @@ OffScreenRenderWidgetHostView::CreateSyntheticGestureTarget() { return nullptr; } -void OffScreenRenderWidgetHostView::ImeCompositionRangeChanged( - const gfx::Range&, - const std::optional>& character_bounds, - const std::optional>& line_bounds) {} - gfx::Size OffScreenRenderWidgetHostView::GetCompositorViewportPixelSize() { return gfx::ScaleToCeiledSize(GetRequestedRendererSize(), GetDeviceScaleFactor()); @@ -676,22 +645,6 @@ bool OffScreenRenderWidgetHostView::InstallTransparency() { } #if BUILDFLAG(IS_MAC) -void OffScreenRenderWidgetHostView::SetActive(bool active) {} - -void OffScreenRenderWidgetHostView::ShowDefinitionForSelection() {} - -void OffScreenRenderWidgetHostView::SpeakSelection() {} - -void OffScreenRenderWidgetHostView::SetWindowFrameInScreen( - const gfx::Rect& rect) {} - -void OffScreenRenderWidgetHostView::ShowSharePicker( - const std::string& title, - const std::string& text, - const std::string& url, - const std::vector& file_paths, - blink::mojom::ShareService::ShareCallback callback) {} - bool OffScreenRenderWidgetHostView::UpdateNSViewAndDisplay() { return false; } diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 2c3d74e738..ec63862c06 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -90,8 +90,8 @@ class OffScreenRenderWidgetHostView gfx::NativeView GetNativeView(void) override; gfx::NativeViewAccessible GetNativeViewAccessible(void) override; ui::TextInputClient* GetTextInputClient() override; - void Focus(void) override; - bool HasFocus(void) override; + void Focus() override {} + bool HasFocus() override; uint32_t GetCaptureSequenceNumber() const override; bool IsSurfaceAvailableForCopy(void) override; void Hide(void) override; @@ -99,27 +99,27 @@ class OffScreenRenderWidgetHostView void EnsureSurfaceSynchronizedForWebTest() override; gfx::Rect GetViewBounds(void) override; gfx::Size GetVisibleViewportSize() override; - void SetInsets(const gfx::Insets&) override; + void SetInsets(const gfx::Insets&) override {} void SetBackgroundColor(SkColor color) override; std::optional GetBackgroundColor() override; - void UpdateBackgroundColor() override; + void UpdateBackgroundColor() override {} blink::mojom::PointerLockResult LockPointer( bool request_unadjusted_movement) override; blink::mojom::PointerLockResult ChangePointerLock( bool request_unadjusted_movement) override; - void UnlockPointer(void) override; + void UnlockPointer(void) override {} void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override; #if BUILDFLAG(IS_MAC) - void SetActive(bool active) override; - void ShowDefinitionForSelection() override; - void SpeakSelection() override; - void SetWindowFrameInScreen(const gfx::Rect& rect) override; + void SetActive(bool active) override {} + void ShowDefinitionForSelection() override {} + void SpeakSelection() override {} + void SetWindowFrameInScreen(const gfx::Rect& rect) override {} void ShowSharePicker( const std::string& title, const std::string& text, const std::string& url, const std::vector& file_paths, - blink::mojom::ShareService::ShareCallback callback) override; + blink::mojom::ShareService::ShareCallback callback) override {} uint64_t GetNSViewId() const override; bool UpdateNSViewAndDisplay(); #endif // BUILDFLAG(IS_MAC) @@ -131,25 +131,26 @@ class OffScreenRenderWidgetHostView void InitAsPopup(content::RenderWidgetHostView* parent_host_view, const gfx::Rect& bounds, const gfx::Rect& anchor_rect) override; - void UpdateCursor(const ui::Cursor&) override; - void SetIsLoading(bool is_loading) override; - void TextInputStateChanged(const ui::mojom::TextInputState& params) override; - void ImeCancelComposition(void) override; + void UpdateCursor(const ui::Cursor&) override {} + void SetIsLoading(bool is_loading) override {} + void TextInputStateChanged(const ui::mojom::TextInputState& params) override { + } + void ImeCancelComposition(void) override {} void RenderProcessGone() override; void ShowWithVisibility(content::PageVisibilityState page_visibility) final; void Destroy(void) override; - void UpdateTooltipUnderCursor(const std::u16string&) override; + void UpdateTooltipUnderCursor(const std::u16string&) override {} input::CursorManager* GetCursorManager() override; void CopyFromSurface( const gfx::Rect& src_rect, const gfx::Size& output_size, base::OnceCallback callback) override; display::ScreenInfo GetScreenInfo() const override; - void TransformPointToRootSurface(gfx::PointF* point) override; + void TransformPointToRootSurface(gfx::PointF* point) override {} gfx::Rect GetBoundsInRootWindow(void) override; std::optional GetDisplayFeature() override; void SetDisplayFeatureForTesting( - const content::DisplayFeature* display_feature) override; + const content::DisplayFeature* display_feature) override {} void NotifyHostAndDelegateOnWasShown( blink::mojom::RecordContentToVisibleTimeRequestPtr) final; void RequestSuccessfulPresentationTimeFromHostOrDelegate( @@ -161,7 +162,7 @@ class OffScreenRenderWidgetHostView void ImeCompositionRangeChanged( const gfx::Range&, const std::optional>& character_bounds, - const std::optional>& line_bounds) override; + const std::optional>& line_bounds) override {} gfx::Size GetCompositorViewportPixelSize() override; ui::Compositor* GetCompositor() override;