Fix crash when hovering buttons in OSR PDF viewer (issue #2488)
This commit is contained in:
parent
f97a241126
commit
c7d187a512
|
@ -27,6 +27,7 @@
|
|||
#include "content/browser/bad_message.h"
|
||||
#include "content/browser/compositor/image_transport_factory.h"
|
||||
#include "content/browser/frame_host/render_widget_host_view_guest.h"
|
||||
#include "content/browser/renderer_host/cursor_manager.h"
|
||||
#include "content/browser/renderer_host/dip_util.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_delegate.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
|
@ -277,6 +278,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||
if (browser_impl_.get())
|
||||
ResizeRootLayer(false);
|
||||
|
||||
cursor_manager_.reset(new content::CursorManager(this));
|
||||
|
||||
// Do this last because it may result in a call to SetNeedsBeginFrames.
|
||||
render_widget_host_->SetView(this);
|
||||
}
|
||||
|
@ -636,6 +639,10 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
|
|||
#endif
|
||||
}
|
||||
|
||||
content::CursorManager* CefRenderWidgetHostViewOSR::GetCursorManager() {
|
||||
return cursor_manager_.get();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::RenderProcessGone(
|
||||
|
|
|
@ -44,6 +44,7 @@ class RenderWidgetHost;
|
|||
class RenderWidgetHostImpl;
|
||||
class RenderWidgetHostViewGuest;
|
||||
class BackingStore;
|
||||
class CursorManager;
|
||||
} // namespace content
|
||||
|
||||
class CefBeginFrameTimer;
|
||||
|
@ -153,6 +154,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
|||
int error_code) override;
|
||||
void Destroy() override;
|
||||
void SetTooltipText(const base::string16& tooltip_text) override;
|
||||
content::CursorManager* GetCursorManager() override;
|
||||
|
||||
gfx::Size GetCompositorViewportPixelSize() const override;
|
||||
void CopyFromSurface(
|
||||
|
@ -346,6 +348,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
|||
std::unique_ptr<ui::XScopedCursor> invisible_cursor_;
|
||||
#endif
|
||||
|
||||
std::unique_ptr<content::CursorManager> cursor_manager_;
|
||||
|
||||
// Used to control the VSync rate in subprocesses when BeginFrame scheduling
|
||||
// is enabled.
|
||||
std::unique_ptr<CefBeginFrameTimer> begin_frame_timer_;
|
||||
|
|
Loading…
Reference in New Issue