| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |