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

Side by Side Diff: content/browser/screen_orientation/screen_orientation_provider.cc

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/screen_orientation/screen_orientation_provider.h" 5 #include "content/browser/screen_orientation/screen_orientation_provider.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 #include "content/browser/web_contents/web_contents_impl.h" 9 #include "content/browser/web_contents/web_contents_impl.h"
10 #include "content/public/browser/navigation_handle.h" 10 #include "content/public/browser/navigation_handle.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (!delegate_->FullScreenRequired(web_contents())) 130 if (!delegate_->FullScreenRequired(web_contents()))
131 return; 131 return;
132 132
133 DCHECK(!entered_fullscreen); 133 DCHECK(!entered_fullscreen);
134 UnlockOrientation(); 134 UnlockOrientation();
135 } 135 }
136 136
137 void ScreenOrientationProvider::DidFinishNavigation( 137 void ScreenOrientationProvider::DidFinishNavigation(
138 NavigationHandle* navigation_handle) { 138 NavigationHandle* navigation_handle) {
139 if (!navigation_handle->IsInMainFrame() || 139 if (!navigation_handle->IsInMainFrame() ||
140 !navigation_handle->HasCommitted() || navigation_handle->IsSamePage()) { 140 !navigation_handle->HasCommitted() ||
141 navigation_handle->IsSameDocument()) {
141 return; 142 return;
142 } 143 }
143 UnlockOrientation(); 144 UnlockOrientation();
144 } 145 }
145 146
146 blink::WebScreenOrientationLockType 147 blink::WebScreenOrientationLockType
147 ScreenOrientationProvider::GetNaturalLockType() const { 148 ScreenOrientationProvider::GetNaturalLockType() const {
148 RenderWidgetHost* rwh = web_contents()->GetRenderViewHost()->GetWidget(); 149 RenderWidgetHost* rwh = web_contents()->GetRenderViewHost()->GetWidget();
149 if (!rwh) 150 if (!rwh)
150 return blink::WebScreenOrientationLockDefault; 151 return blink::WebScreenOrientationLockDefault;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 case blink::WebScreenOrientationLockDefault: 214 case blink::WebScreenOrientationLockDefault:
214 NOTREACHED(); 215 NOTREACHED();
215 return false; 216 return false;
216 } 217 }
217 218
218 NOTREACHED(); 219 NOTREACHED();
219 return false; 220 return false;
220 } 221 }
221 222
222 } // namespace content 223 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/presentation/presentation_service_impl.cc ('k') | content/browser/webui/web_ui_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698