From 687671d249613bb2b00570f93df35fcaa0eacdd3 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 1 Aug 2019 15:42:46 +0200 Subject: Adaptations for Chromium 76 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id6d18a3854b572334dc1d65f1916b8991a740cd2 Reviewed-by: Jüri Valdmann --- src/core/render_widget_host_view_qt.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/core/render_widget_host_view_qt.cpp') diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index c98612192..cf02731c7 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -341,6 +341,7 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost *widget // May call SetNeedsBeginFrames host()->SetView(this); + host()->GetProcess()->AddObserver(this); } RenderWidgetHostViewQt::~RenderWidgetHostViewQt() @@ -354,6 +355,7 @@ RenderWidgetHostViewQt::~RenderWidgetHostViewQt() if (text_input_manager_) text_input_manager_->RemoveObserver(this); + host()->GetProcess()->RemoveObserver(this); m_touchSelectionController.reset(); m_touchSelectionControllerClient.reset(); @@ -694,15 +696,20 @@ void RenderWidgetHostViewQt::ImeCompositionRangeChanged(const gfx::Range&, const QT_NOT_YET_IMPLEMENTED } -void RenderWidgetHostViewQt::RenderProcessGone(base::TerminationStatus terminationStatus, - int exitCode) +void RenderWidgetHostViewQt::RenderProcessExited(content::RenderProcessHost *host, + const content::ChildProcessTerminationInfo &info) { + Q_UNUSED(host); // RenderProcessHost::FastShutdownIfPossible results in TERMINATION_STATUS_STILL_RUNNING - if (m_adapterClient && terminationStatus != base::TERMINATION_STATUS_STILL_RUNNING) { + if (m_adapterClient && info.status != base::TERMINATION_STATUS_STILL_RUNNING) { m_adapterClient->renderProcessTerminated( - m_adapterClient->renderProcessExitStatus(terminationStatus), - exitCode); + m_adapterClient->renderProcessExitStatus(info.status), + info.exit_code); } +} + +void RenderWidgetHostViewQt::RenderProcessGone() +{ Destroy(); } @@ -1010,10 +1017,8 @@ void RenderWidgetHostViewQt::notifyShown() m_delegatedFrameHost->WasShown(GetLocalSurfaceIdAllocation().local_surface_id(), m_viewRectInDips.size(), false /* record_presentation_time */); - host()->WasShown(false); - } else { - host()->WasShown(false); } + host()->WasShown(base::nullopt); } void RenderWidgetHostViewQt::notifyHidden() -- cgit v1.2.3