Commit e55b893b 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=mlamouri@chromium.org

Bug: 1142671
Change-Id: I14e20b732dd574ce2bdaba4ce2d885fa40795f40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500703
Auto-Submit: Lucas Gadani <lfg@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823648}
parent beac1f6d
...@@ -42,8 +42,8 @@ void ScreenOrientationProvider::LockOrientation( ...@@ -42,8 +42,8 @@ void ScreenOrientationProvider::LockOrientation(
} }
if (delegate_->FullScreenRequired(web_contents())) { if (delegate_->FullScreenRequired(web_contents())) {
RenderViewHostImpl* rvhi = RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
static_cast<RenderViewHostImpl*>(web_contents()->GetRenderViewHost()); web_contents()->GetMainFrame()->GetRenderViewHost());
if (!rvhi) { if (!rvhi) {
NotifyLockResult(ScreenOrientationLockResult:: NotifyLockResult(ScreenOrientationLockResult::
SCREEN_ORIENTATION_LOCK_RESULT_ERROR_CANCELED); SCREEN_ORIENTATION_LOCK_RESULT_ERROR_CANCELED);
...@@ -149,7 +149,8 @@ void ScreenOrientationProvider::DidFinishNavigation( ...@@ -149,7 +149,8 @@ void ScreenOrientationProvider::DidFinishNavigation(
device::mojom::ScreenOrientationLockType device::mojom::ScreenOrientationLockType
ScreenOrientationProvider::GetNaturalLockType() const { ScreenOrientationProvider::GetNaturalLockType() const {
RenderWidgetHost* rwh = web_contents()->GetRenderViewHost()->GetWidget(); RenderWidgetHost* rwh =
web_contents()->GetMainFrame()->GetRenderViewHost()->GetWidget();
if (!rwh) if (!rwh)
return device::mojom::ScreenOrientationLockType::DEFAULT; return device::mojom::ScreenOrientationLockType::DEFAULT;
...@@ -181,7 +182,8 @@ ScreenOrientationProvider::GetNaturalLockType() const { ...@@ -181,7 +182,8 @@ ScreenOrientationProvider::GetNaturalLockType() const {
bool ScreenOrientationProvider::LockMatchesCurrentOrientation( bool ScreenOrientationProvider::LockMatchesCurrentOrientation(
device::mojom::ScreenOrientationLockType lock) { device::mojom::ScreenOrientationLockType lock) {
RenderWidgetHost* rwh = web_contents()->GetRenderViewHost()->GetWidget(); RenderWidgetHost* rwh =
web_contents()->GetMainFrame()->GetRenderViewHost()->GetWidget();
if (!rwh) if (!rwh)
return false; return false;
......
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