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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 willEnterFullScreen(); | 156 willEnterFullScreen(); |
157 didEnterFullScreen(); | 157 didEnterFullScreen(); |
158 return; | 158 return; |
159 } | 159 } |
160 | 160 |
161 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() | 161 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() |
162 && isHTMLMediaElement(element) | 162 && isHTMLMediaElement(element) |
163 // FIXME: There is no embedder-side handling in layout test mode. | 163 // FIXME: There is no embedder-side handling in layout test mode. |
164 && !isRunningLayoutTest()) { | 164 && !isRunningLayoutTest()) { |
165 HTMLMediaElement* mediaElement = toHTMLMediaElement(element); | 165 HTMLMediaElement* mediaElement = toHTMLMediaElement(element); |
166 if (mediaElement->player() && mediaElement->player()->canShowFullscreenO
verlay()) { | 166 if (mediaElement->webMediaPlayer() && mediaElement->webMediaPlayer()->ca
nEnterFullscreen()) { |
167 mediaElement->player()->showFullscreenOverlay(); | 167 mediaElement->webMediaPlayer()->enterFullscreen(); |
168 m_provisionalFullScreenElement = element; | 168 m_provisionalFullScreenElement = element; |
169 return; | 169 return; |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
173 // We need to transition to fullscreen mode. | 173 // We need to transition to fullscreen mode. |
174 if (WebViewClient* client = m_webViewImpl->client()) { | 174 if (WebViewClient* client = m_webViewImpl->client()) { |
175 if (client->enterFullScreen()) | 175 if (client->enterFullScreen()) |
176 m_provisionalFullScreenElement = element; | 176 m_provisionalFullScreenElement = element; |
177 } | 177 } |
178 } | 178 } |
179 | 179 |
180 void FullscreenController::exitFullScreenForElement(WebCore::Element* element) | 180 void FullscreenController::exitFullScreenForElement(WebCore::Element* element) |
181 { | 181 { |
182 // The client is exiting full screen, so don't send a notification. | 182 // The client is exiting full screen, so don't send a notification. |
183 if (m_isCancelingFullScreen) | 183 if (m_isCancelingFullScreen) |
184 return; | 184 return; |
185 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() | 185 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() |
186 && isHTMLMediaElement(element) | 186 && isHTMLMediaElement(element) |
187 // FIXME: There is no embedder-side handling in layout test mode. | 187 // FIXME: There is no embedder-side handling in layout test mode. |
188 && !isRunningLayoutTest()) { | 188 && !isRunningLayoutTest()) { |
189 HTMLMediaElement* mediaElement = toHTMLMediaElement(element); | 189 HTMLMediaElement* mediaElement = toHTMLMediaElement(element); |
190 if (mediaElement->player()) | 190 if (mediaElement->webMediaPlayer()) |
191 mediaElement->player()->hideFullscreenOverlay(); | 191 mediaElement->webMediaPlayer()->exitFullscreen(); |
192 return; | 192 return; |
193 } | 193 } |
194 if (WebViewClient* client = m_webViewImpl->client()) | 194 if (WebViewClient* client = m_webViewImpl->client()) |
195 client->exitFullScreen(); | 195 client->exitFullScreen(); |
196 } | 196 } |
197 | 197 |
198 } | 198 } |
199 | 199 |
OLD | NEW |