Index: content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc b/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
index 0b2fccea286d1296defe6dc3bbba70dd07609a9e..a47784f86143c951948a9bb66edcd0443a936ac9 100644 |
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
@@ -5,6 +5,7 @@ |
#include "content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h" |
#include "content/common/screen_orientation_messages.h" |
+#include "content/public/browser/navigation_details.h" |
#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/render_view_host.h" |
@@ -55,6 +56,13 @@ bool ScreenOrientationDispatcherHostImpl::OnMessageReceived( |
return handled; |
} |
+void ScreenOrientationDispatcherHostImpl::DidNavigateMainFrame( |
+ const LoadCommittedDetails& details, const FrameNavigateParams& params) { |
+ if (!provider_ || details.is_in_page) |
+ return; |
+ provider_->UnlockOrientation(); |
+} |
+ |
RenderFrameHost* |
ScreenOrientationDispatcherHostImpl::GetRenderFrameHostForRequestID( |
int request_id) { |