| Index: content/public/browser/screen_orientation_provider.cc
|
| diff --git a/content/public/browser/screen_orientation_provider.cc b/content/public/browser/screen_orientation_provider.cc
|
| index 7da24eb3d02a3f4605f178b9386710303c172498..da569116249a7e2fce74fa704ce711c681fddb34 100644
|
| --- a/content/public/browser/screen_orientation_provider.cc
|
| +++ b/content/public/browser/screen_orientation_provider.cc
|
| @@ -19,7 +19,9 @@ using device::mojom::ScreenOrientationLockResult;
|
| ScreenOrientationDelegate* ScreenOrientationProvider::delegate_ = nullptr;
|
|
|
| ScreenOrientationProvider::ScreenOrientationProvider(WebContents* web_contents)
|
| - : WebContentsObserver(web_contents), lock_applied_(false) {}
|
| + : WebContentsObserver(web_contents),
|
| + lock_applied_(false),
|
| + bindings_(web_contents, this) {}
|
|
|
| ScreenOrientationProvider::~ScreenOrientationProvider() {
|
| }
|
| @@ -106,9 +108,9 @@ void ScreenOrientationProvider::OnOrientationChange() {
|
|
|
| void ScreenOrientationProvider::NotifyLockResult(
|
| ScreenOrientationLockResult result) {
|
| - if (!pending_callback_.is_null()) {
|
| + if (!pending_callback_.is_null())
|
| base::ResetAndReturn(&pending_callback_).Run(result);
|
| - }
|
| +
|
| pending_lock_orientation_.reset();
|
| }
|
|
|
| @@ -131,6 +133,14 @@ void ScreenOrientationProvider::DidToggleFullscreenModeForTab(
|
| UnlockOrientation();
|
| }
|
|
|
| +void ScreenOrientationProvider::DidNavigateMainFrame(
|
| + const LoadCommittedDetails& details,
|
| + const FrameNavigateParams& params) {
|
| + if (details.is_in_page)
|
| + return;
|
| + UnlockOrientation();
|
| +}
|
| +
|
| blink::WebScreenOrientationLockType
|
| ScreenOrientationProvider::GetNaturalLockType() const {
|
| RenderWidgetHost* rwh = web_contents()->GetRenderViewHost()->GetWidget();
|
|
|