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 |
158 // We are already transitioning to fullscreen for a different element. | 161 // We are already transitioning to fullscreen for a different element. |
159 if (m_provisionalFullScreenElement) { | 162 if (m_provisionalFullScreenElement) { |
160 m_provisionalFullScreenElement = element; | 163 m_provisionalFullScreenElement = element; |
161 return; | 164 return; |
162 } | 165 } |
163 | 166 |
164 // We are already in fullscreen mode. | 167 // We are already in fullscreen mode. |
165 if (m_fullScreenFrame) { | 168 if (m_fullScreenFrame) { |
166 m_provisionalFullScreenElement = element; | 169 m_provisionalFullScreenElement = element; |
167 willEnterFullScreen(); | 170 willEnterFullScreen(); |
(...skipping 12 matching lines...) Expand all Loading... |
180 { | 183 { |
181 // The client is exiting full screen, so don't send a notification. | 184 // The client is exiting full screen, so don't send a notification. |
182 if (m_isCancelingFullScreen) | 185 if (m_isCancelingFullScreen) |
183 return; | 186 return; |
184 if (WebViewClient* client = m_webViewImpl->client()) | 187 if (WebViewClient* client = m_webViewImpl->client()) |
185 client->exitFullScreen(); | 188 client->exitFullScreen(); |
186 } | 189 } |
187 | 190 |
188 } | 191 } |
189 | 192 |
OLD | NEW |