OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 fullscreen->didExitFullScreenForElement(0); | 148 fullscreen->didExitFullScreenForElement(0); |
149 } | 149 } |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 m_fullScreenFrame.clear(); | 153 m_fullScreenFrame.clear(); |
154 } | 154 } |
155 | 155 |
156 void FullscreenController::enterFullScreenForElement(blink::Element* element) | 156 void FullscreenController::enterFullScreenForElement(blink::Element* element) |
157 { | 157 { |
158 if (m_webViewImpl->settingsImpl()->disallowFullscreenForNonMediaElements() &
& !isHTMLMediaElement(element)) | |
159 return; | |
160 | |
161 // We are already transitioning to fullscreen for a different element. | 158 // We are already transitioning to fullscreen for a different element. |
162 if (m_provisionalFullScreenElement) { | 159 if (m_provisionalFullScreenElement) { |
163 m_provisionalFullScreenElement = element; | 160 m_provisionalFullScreenElement = element; |
164 return; | 161 return; |
165 } | 162 } |
166 | 163 |
167 // We are already in fullscreen mode. | 164 // We are already in fullscreen mode. |
168 if (m_fullScreenFrame) { | 165 if (m_fullScreenFrame) { |
169 m_provisionalFullScreenElement = element; | 166 m_provisionalFullScreenElement = element; |
170 willEnterFullScreen(); | 167 willEnterFullScreen(); |
(...skipping 12 matching lines...) Expand all Loading... |
183 { | 180 { |
184 // The client is exiting full screen, so don't send a notification. | 181 // The client is exiting full screen, so don't send a notification. |
185 if (m_isCancelingFullScreen) | 182 if (m_isCancelingFullScreen) |
186 return; | 183 return; |
187 if (WebViewClient* client = m_webViewImpl->client()) | 184 if (WebViewClient* client = m_webViewImpl->client()) |
188 client->exitFullScreen(); | 185 client->exitFullScreen(); |
189 } | 186 } |
190 | 187 |
191 } | 188 } |
192 | 189 |
OLD | NEW |