| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 , m_isCancelingFullScreen(false) | 54 , m_isCancelingFullScreen(false) |
| 55 { | 55 { |
| 56 } | 56 } |
| 57 | 57 |
| 58 void FullscreenController::willEnterFullScreen() | 58 void FullscreenController::willEnterFullScreen() |
| 59 { | 59 { |
| 60 if (!m_provisionalFullScreenElement) | 60 if (!m_provisionalFullScreenElement) |
| 61 return; | 61 return; |
| 62 | 62 |
| 63 // Ensure that this element's document is still attached. | 63 // Ensure that this element's document is still attached. |
| 64 Document* doc = m_provisionalFullScreenElement->document(); | 64 Document& doc = m_provisionalFullScreenElement->document(); |
| 65 if (doc->frame()) { | 65 if (doc.frame()) { |
| 66 FullscreenElementStack::from(doc)->webkitWillEnterFullScreenForElement(m
_provisionalFullScreenElement.get()); | 66 FullscreenElementStack::from(&doc)->webkitWillEnterFullScreenForElement(
m_provisionalFullScreenElement.get()); |
| 67 m_fullScreenFrame = doc->frame(); | 67 m_fullScreenFrame = doc.frame(); |
| 68 } | 68 } |
| 69 m_provisionalFullScreenElement.clear(); | 69 m_provisionalFullScreenElement.clear(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void FullscreenController::didEnterFullScreen() | 72 void FullscreenController::didEnterFullScreen() |
| 73 { | 73 { |
| 74 if (!m_fullScreenFrame) | 74 if (!m_fullScreenFrame) |
| 75 return; | 75 return; |
| 76 | 76 |
| 77 if (Document* doc = m_fullScreenFrame->document()) { | 77 if (Document* doc = m_fullScreenFrame->document()) { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 mediaElement->player()->exitFullscreen(); | 176 mediaElement->player()->exitFullscreen(); |
| 177 return; | 177 return; |
| 178 } | 178 } |
| 179 #endif | 179 #endif |
| 180 if (WebViewClient* client = m_webViewImpl->client()) | 180 if (WebViewClient* client = m_webViewImpl->client()) |
| 181 client->exitFullScreen(); | 181 client->exitFullScreen(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 } | 184 } |
| 185 | 185 |
| OLD | NEW |