| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 // We are already in fullscreen mode. | 138 // We are already in fullscreen mode. |
| 139 if (m_fullScreenFrame) { | 139 if (m_fullScreenFrame) { |
| 140 m_provisionalFullScreenElement = element; | 140 m_provisionalFullScreenElement = element; |
| 141 didEnterFullScreen(); | 141 didEnterFullScreen(); |
| 142 return; | 142 return; |
| 143 } | 143 } |
| 144 | 144 |
| 145 // We need to transition to fullscreen mode. | 145 // We need to transition to fullscreen mode. |
| 146 if (WebViewClient* client = m_webViewImpl->client()) { | 146 if (WebViewClient* client = m_webViewImpl->client()) { |
| 147 if (client->enterFullScreen()) | 147 if (client->enterFullScreen(isHTMLVideoElement(element))) |
| 148 m_provisionalFullScreenElement = element; | 148 m_provisionalFullScreenElement = element; |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 | 151 |
| 152 void FullscreenController::exitFullScreenForElement(Element* element) | 152 void FullscreenController::exitFullScreenForElement(Element* element) |
| 153 { | 153 { |
| 154 // The client is exiting full screen, so don't send a notification. | 154 // The client is exiting full screen, so don't send a notification. |
| 155 if (m_isCancelingFullScreen) | 155 if (m_isCancelingFullScreen) |
| 156 return; | 156 return; |
| 157 if (WebViewClient* client = m_webViewImpl->client()) | 157 if (WebViewClient* client = m_webViewImpl->client()) |
| 158 client->exitFullScreen(); | 158 client->exitFullScreen(isHTMLVideoElement(element)); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void FullscreenController::trace(Visitor* visitor) | 161 void FullscreenController::trace(Visitor* visitor) |
| 162 { | 162 { |
| 163 visitor->trace(m_provisionalFullScreenElement); | 163 visitor->trace(m_provisionalFullScreenElement); |
| 164 visitor->trace(m_fullScreenFrame); | 164 visitor->trace(m_fullScreenFrame); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace blink | 167 } // namespace blink |
| 168 | 168 |
| OLD | NEW |