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

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

Issue 1488653002: Fix scroll restoration when exiting fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Accidentally made will_cause_resize always false in previous cleanup. Fixed Created 4 years, 10 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/public/browser/screen_orientation_provider.h" 5 #include "content/public/browser/screen_orientation_provider.h"
6 6
7 #include "content/browser/renderer_host/render_view_host_impl.h" 7 #include "content/browser/renderer_host/render_view_host_impl.h"
8 #include "content/browser/web_contents/web_contents_impl.h" 8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/public/browser/render_widget_host.h" 9 #include "content/public/browser/render_widget_host.h"
10 #include "content/public/browser/screen_orientation_delegate.h" 10 #include "content/public/browser/screen_orientation_delegate.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 pending_lock_.reset(); 106 pending_lock_.reset();
107 } 107 }
108 } 108 }
109 109
110 void ScreenOrientationProvider::SetDelegate( 110 void ScreenOrientationProvider::SetDelegate(
111 ScreenOrientationDelegate* delegate) { 111 ScreenOrientationDelegate* delegate) {
112 delegate_ = delegate; 112 delegate_ = delegate;
113 } 113 }
114 114
115 void ScreenOrientationProvider::DidToggleFullscreenModeForTab( 115 void ScreenOrientationProvider::DidToggleFullscreenModeForTab(
116 bool entered_fullscreen) { 116 bool entered_fullscreen, bool will_cause_resize) {
117 if (!lock_applied_ || !delegate_) 117 if (!lock_applied_ || !delegate_)
118 return; 118 return;
119 119
120 // If fullscreen is not required in order to lock orientation, don't unlock 120 // If fullscreen is not required in order to lock orientation, don't unlock
121 // when fullscreen state changes. 121 // when fullscreen state changes.
122 if (!delegate_->FullScreenRequired(web_contents())) 122 if (!delegate_->FullScreenRequired(web_contents()))
123 return; 123 return;
124 124
125 DCHECK(!entered_fullscreen); 125 DCHECK(!entered_fullscreen);
126 UnlockOrientation(); 126 UnlockOrientation();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 case blink::WebScreenOrientationLockDefault: 197 case blink::WebScreenOrientationLockDefault:
198 NOTREACHED(); 198 NOTREACHED();
199 return false; 199 return false;
200 } 200 }
201 201
202 NOTREACHED(); 202 NOTREACHED();
203 return false; 203 return false;
204 } 204 }
205 205
206 } // namespace content 206 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/screen_orientation_provider.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698