OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 m_popupClient->writeDocument(data.get()); | 231 m_popupClient->writeDocument(data.get()); |
232 frame->loader().load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "t
ext/html", "UTF-8", KURL(), ForceSynchronousLoad))); | 232 frame->loader().load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "t
ext/html", "UTF-8", KURL(), ForceSynchronousLoad))); |
233 return true; | 233 return true; |
234 } | 234 } |
235 | 235 |
236 void WebPagePopupImpl::destroyPage() | 236 void WebPagePopupImpl::destroyPage() |
237 { | 237 { |
238 if (!m_page) | 238 if (!m_page) |
239 return; | 239 return; |
240 | 240 |
241 if (m_page->mainFrame()) | |
242 toLocalFrame(m_page->mainFrame())->loader().frameDetached(); | |
243 | |
244 m_page->willBeDestroyed(); | 241 m_page->willBeDestroyed(); |
245 m_page.clear(); | 242 m_page.clear(); |
246 } | 243 } |
247 | 244 |
248 void WebPagePopupImpl::setRootGraphicsLayer(GraphicsLayer* layer) | 245 void WebPagePopupImpl::setRootGraphicsLayer(GraphicsLayer* layer) |
249 { | 246 { |
250 m_rootGraphicsLayer = layer; | 247 m_rootGraphicsLayer = layer; |
251 m_rootLayer = layer ? layer->platformLayer() : 0; | 248 m_rootLayer = layer ? layer->platformLayer() : 0; |
252 | 249 |
253 setIsAcceleratedCompositingActive(layer); | 250 setIsAcceleratedCompositingActive(layer); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // A WebPagePopupImpl instance usually has two references. | 400 // A WebPagePopupImpl instance usually has two references. |
404 // - One owned by the instance itself. It represents the visible widget. | 401 // - One owned by the instance itself. It represents the visible widget. |
405 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 402 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
406 // WebPagePopupImpl to close. | 403 // WebPagePopupImpl to close. |
407 // We need them because the closing operation is asynchronous and the widget | 404 // We need them because the closing operation is asynchronous and the widget |
408 // can be closed while the WebViewImpl is unaware of it. | 405 // can be closed while the WebViewImpl is unaware of it. |
409 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 406 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
410 } | 407 } |
411 | 408 |
412 } // namespace blink | 409 } // namespace blink |
OLD | NEW |