Commit 38a3ea1d authored by Lucas Furukawa Gadani's avatar Lucas Furukawa Gadani Committed by Commit Bot

Remove usages of WebContents::GetRenderViewHost().

This CL was uploaded by git cl split.

R=karandeepb@chromium.org

Bug: 1142671
Change-Id: I8c2164e9841f1470aba590d8b8a3e4e1c2d116c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500211
Auto-Submit: Lucas Gadani <lfg@chromium.org>
Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821182}
parent 02ad74e1
......@@ -94,7 +94,7 @@ class DeclarativeContentCssConditionTrackerTest
content::WebContents* tab,
const std::vector<std::string>& selectors) {
ExtensionHostMsg_OnWatchedPageChange page_change(
tab->GetRenderViewHost()->GetRoutingID(), selectors);
tab->GetMainFrame()->GetRenderViewHost()->GetRoutingID(), selectors);
EXPECT_TRUE(GetMockRenderProcessHost(tab)->OnMessageReceived(page_change));
}
......
......@@ -364,6 +364,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_BookmarkAppGetsNormalProcess) {
content::RenderProcessHost* old_process = browser()
->tab_strip_model()
->GetWebContentsAt(2)
->GetMainFrame()
->GetRenderViewHost()
->GetProcess();
NavigateInRenderer(browser()->tab_strip_model()->GetWebContentsAt(2),
......
......@@ -41,8 +41,10 @@ void MouseDownInWebContents(content::WebContents* web_contents) {
mouse_event.button = blink::WebMouseEvent::Button::kLeft;
mouse_event.SetPositionInWidget(10, 10);
mouse_event.click_count = 1;
web_contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(
mouse_event);
web_contents->GetMainFrame()
->GetRenderViewHost()
->GetWidget()
->ForwardMouseEvent(mouse_event);
}
void MouseUpInWebContents(content::WebContents* web_contents) {
......@@ -52,8 +54,10 @@ void MouseUpInWebContents(content::WebContents* web_contents) {
mouse_event.button = blink::WebMouseEvent::Button::kLeft;
mouse_event.SetPositionInWidget(10, 10);
mouse_event.click_count = 1;
web_contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(
mouse_event);
web_contents->GetMainFrame()
->GetRenderViewHost()
->GetWidget()
->ForwardMouseEvent(mouse_event);
}
class ExtensionBindingsApiTest : public ExtensionApiTest {
......
......@@ -90,8 +90,12 @@ ExtensionViewHost::ExtensionViewHost(const Extension* extension,
content::HostZoomMap* zoom_map =
content::HostZoomMap::GetForWebContents(host_contents());
zoom_map->SetTemporaryZoomLevel(
host_contents()->GetRenderViewHost()->GetProcess()->GetID(),
host_contents()->GetRenderViewHost()->GetRoutingID(),
host_contents()
->GetMainFrame()
->GetRenderViewHost()
->GetProcess()
->GetID(),
host_contents()->GetMainFrame()->GetRenderViewHost()->GetRoutingID(),
zoom_map->GetDefaultZoomLevel());
}
}
......
......@@ -597,11 +597,11 @@ void WebstoreInstaller::StartDownload(const std::string& extension_id,
ReportFailure(kDownloadDirectoryError, FAILURE_REASON_OTHER);
return;
}
if (!contents->GetRenderViewHost()) {
if (!contents->GetMainFrame()->GetRenderViewHost()) {
ReportFailure(kDownloadDirectoryError, FAILURE_REASON_OTHER);
return;
}
if (!contents->GetRenderViewHost()->GetProcess()) {
if (!contents->GetMainFrame()->GetRenderViewHost()->GetProcess()) {
ReportFailure(kDownloadDirectoryError, FAILURE_REASON_OTHER);
return;
}
......@@ -620,7 +620,7 @@ void WebstoreInstaller::StartDownload(const std::string& extension_id,
// We will navigate the current tab to this url to start the download. The
// download system will then pass the crx to the CrxInstaller.
int render_process_host_id =
contents->GetRenderViewHost()->GetProcess()->GetID();
contents->GetMainFrame()->GetRenderViewHost()->GetProcess()->GetID();
content::RenderFrameHost* render_frame_host = contents->GetMainFrame();
net::NetworkTrafficAnnotationTag traffic_annotation =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment