Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2168)

Unified Diff: content/browser/screen_orientation/screen_orientation.cc

Issue 2668833002: Convert ScreenOrientation to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/screen_orientation/screen_orientation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/screen_orientation/screen_orientation.cc
diff --git a/content/browser/screen_orientation/screen_orientation.cc b/content/browser/screen_orientation/screen_orientation.cc
index 98daf1cbadd8f233bcfe56a1098af330317a819d..0bc40eba4a20040582467f7a84fb35f372308ac5 100644
--- a/content/browser/screen_orientation/screen_orientation.cc
+++ b/content/browser/screen_orientation/screen_orientation.cc
@@ -4,7 +4,7 @@
#include "content/browser/screen_orientation/screen_orientation.h"
-#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/screen_orientation_provider.h"
#include "content/public/browser/web_contents.h"
@@ -29,11 +29,13 @@ void ScreenOrientation::UnlockOrientation() {
provider_->UnlockOrientation();
}
-void ScreenOrientation::DidNavigateMainFrame(
- const LoadCommittedDetails& details,
- const FrameNavigateParams& params) {
- if (details.is_in_page)
- return;
+void ScreenOrientation::DidFinishNavigation(
+ NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame() ||
+ !navigation_handle->HasCommitted() ||
+ navigation_handle->IsSamePage()) {
+ return;
+ }
provider_->UnlockOrientation();
}
« no previous file with comments | « content/browser/screen_orientation/screen_orientation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698