Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2484793002: Remove access to WebContents in RWHVA::SynchronousFrameMetadata() (Closed)
Patch Set: comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 78c0d2271379a3629f84f3621665b921121d1daf..18f6c4853ae57563a2107c82686fc95c3554d67a 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -1191,17 +1191,11 @@ void RenderWidgetHostViewAndroid::SynchronousFrameMetadata(
OnFrameMetadataUpdated(frame_metadata.Clone(), false);
// DevTools ScreenCast support for Android WebView.
- WebContents* web_contents = content_view_core_->GetWebContents();
- if (DevToolsAgentHost::HasFor(web_contents)) {
- scoped_refptr<DevToolsAgentHost> dtah =
- DevToolsAgentHost::GetOrCreateFor(web_contents);
- // Unblock the compositor.
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(
- &RenderFrameDevToolsAgentHost::SynchronousSwapCompositorFrame,
- static_cast<RenderFrameDevToolsAgentHost*>(dtah.get()),
- base::Passed(&frame_metadata)));
+ RenderFrameHost* frame_host = RenderViewHost::From(host_)->GetMainFrame();
+ if (frame_host) {
+ RenderFrameDevToolsAgentHost::SignalSynchronousSwapCompositorFrame(
+ frame_host,
+ std::move(frame_metadata));
}
}
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698