Commit 49927990 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=jdoerrie@chromium.org

Bug: 1142671
Change-Id: If23eef3937c4bb5b45539634a421c57d9e1b580a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500212
Auto-Submit: Lucas Gadani <lfg@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821146}
parent a1c73f4c
...@@ -272,7 +272,7 @@ ChromePasswordManagerClient::~ChromePasswordManagerClient() { ...@@ -272,7 +272,7 @@ ChromePasswordManagerClient::~ChromePasswordManagerClient() {
VLOG(1) << "wc: " << web_contents(); VLOG(1) << "wc: " << web_contents();
if (web_contents()) { if (web_contents()) {
VLOG(1) << "wc->GetRenderViewHost(): " VLOG(1) << "wc->GetRenderViewHost(): "
<< web_contents()->GetRenderViewHost(); << web_contents()->GetMainFrame()->GetRenderViewHost();
} }
#endif #endif
} }
...@@ -1196,7 +1196,8 @@ ChromePasswordManagerClient::ChromePasswordManagerClient( ...@@ -1196,7 +1196,8 @@ ChromePasswordManagerClient::ChromePasswordManagerClient(
// TODO(https://crbug.com/1104919): Remove this logging. // TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this; VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "wc: " << web_contents; VLOG(1) << "wc: " << web_contents;
VLOG(1) << "wc->GetRenderViewHost(): " << web_contents->GetRenderViewHost(); VLOG(1) << "wc->GetRenderViewHost(): "
<< web_contents->GetMainFrame()->GetRenderViewHost();
#endif #endif
} }
...@@ -1233,10 +1234,11 @@ void ChromePasswordManagerClient::DidFinishNavigation( ...@@ -1233,10 +1234,11 @@ void ChromePasswordManagerClient::DidFinishNavigation(
// TODO(https://crbug.com/1104919): Remove this logging. // TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this; VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "wc: " << web_contents(); VLOG(1) << "wc: " << web_contents();
VLOG(1) << "wc->GetRenderViewHost(): " << web_contents()->GetRenderViewHost(); VLOG(1) << "wc->GetRenderViewHost(): "
<< web_contents()->GetMainFrame()->GetRenderViewHost();
#endif #endif
AddToWidgetInputEventObservers( AddToWidgetInputEventObservers(
web_contents()->GetRenderViewHost()->GetWidget(), this); web_contents()->GetMainFrame()->GetRenderViewHost()->GetWidget(), this);
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
// This unblacklisted info is only used after form submission to determine // This unblacklisted info is only used after form submission to determine
// whether to record PasswordManager.SaveUIDismissalReasonAfterUnblacklisting. // whether to record PasswordManager.SaveUIDismissalReasonAfterUnblacklisting.
...@@ -1257,16 +1259,17 @@ void ChromePasswordManagerClient::WebContentsDestroyed() { ...@@ -1257,16 +1259,17 @@ void ChromePasswordManagerClient::WebContentsDestroyed() {
// don't like to be destroyed earlier than the pipe itself. // don't like to be destroyed earlier than the pipe itself.
content_credential_manager_.DisconnectBinding(); content_credential_manager_.DisconnectBinding();
DCHECK(web_contents()->GetRenderViewHost()); DCHECK(web_contents()->GetMainFrame()->GetRenderViewHost());
#if !BUILDFLAG(GOOGLE_CHROME_BRANDING) #if !BUILDFLAG(GOOGLE_CHROME_BRANDING)
// TODO(https://crbug.com/1104919): Remove this logging. // TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this; VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "wc: " << web_contents(); VLOG(1) << "wc: " << web_contents();
VLOG(1) << "wc->GetRenderViewHost(): " << web_contents()->GetRenderViewHost(); VLOG(1) << "wc->GetRenderViewHost(): "
<< web_contents()->GetMainFrame()->GetRenderViewHost();
#endif #endif
RemoveFromWidgetInputEventObservers( RemoveFromWidgetInputEventObservers(
web_contents()->GetRenderViewHost()->GetWidget(), this); web_contents()->GetMainFrame()->GetRenderViewHost()->GetWidget(), this);
auto* autofill_assistant_manager = auto* autofill_assistant_manager =
autofill_assistant::RuntimeManager::GetForWebContents(web_contents()); autofill_assistant::RuntimeManager::GetForWebContents(web_contents());
...@@ -1281,7 +1284,8 @@ void ChromePasswordManagerClient::OnPaste() { ...@@ -1281,7 +1284,8 @@ void ChromePasswordManagerClient::OnPaste() {
// TODO(https://crbug.com/1104919): Remove this logging. // TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this; VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "wc: " << web_contents(); VLOG(1) << "wc: " << web_contents();
VLOG(1) << "wc->GetRenderViewHost(): " << web_contents()->GetRenderViewHost(); VLOG(1) << "wc->GetRenderViewHost(): "
<< web_contents()->GetMainFrame()->GetRenderViewHost();
#endif #endif
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
......
...@@ -183,8 +183,11 @@ class PasswordGenerationInteractiveTest ...@@ -183,8 +183,11 @@ class PasswordGenerationInteractiveTest
blink::WebInputEvent::kNoModifiers, blink::WebInputEvent::kNoModifiers,
blink::WebInputEvent::GetStaticTimeStampForTests()); blink::WebInputEvent::GetStaticTimeStampForTests());
event.windows_key_code = key; event.windows_key_code = key;
WebContents()->GetRenderViewHost()->GetWidget()->ForwardKeyboardEvent( WebContents()
event); ->GetMainFrame()
->GetRenderViewHost()
->GetWidget()
->ForwardKeyboardEvent(event);
} }
bool GenerationPopupShowing() { bool GenerationPopupShowing() {
......
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