OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 m_webFrame->willDetachParent(); | 287 m_webFrame->willDetachParent(); |
288 | 288 |
289 // Signal that no further communication with WebFrameClient should take | 289 // Signal that no further communication with WebFrameClient should take |
290 // place at this point since we are no longer associated with the Page. | 290 // place at this point since we are no longer associated with the Page. |
291 m_webFrame->setClient(0); | 291 m_webFrame->setClient(0); |
292 | 292 |
293 client->frameDetached(m_webFrame); | 293 client->frameDetached(m_webFrame); |
294 // Clear our reference to WebCore::Frame at the very end, in case the client | 294 // Clear our reference to WebCore::Frame at the very end, in case the client |
295 // refers to it. | 295 // refers to it. |
296 m_webFrame->setWebCoreFrame(0); | 296 m_webFrame->setWebCoreFrame(nullptr); |
297 } | 297 } |
298 | 298 |
299 void FrameLoaderClientImpl::dispatchWillRequestAfterPreconnect(ResourceRequest&
request) | 299 void FrameLoaderClientImpl::dispatchWillRequestAfterPreconnect(ResourceRequest&
request) |
300 { | 300 { |
301 if (m_webFrame->client()) { | 301 if (m_webFrame->client()) { |
302 WrappedResourceRequest webreq(request); | 302 WrappedResourceRequest webreq(request); |
303 m_webFrame->client()->willRequestAfterPreconnect(m_webFrame, webreq); | 303 m_webFrame->client()->willRequestAfterPreconnect(m_webFrame, webreq); |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin( | 618 PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin( |
619 const IntSize& size, // FIXME: how do we use this? | 619 const IntSize& size, // FIXME: how do we use this? |
620 HTMLPlugInElement* element, | 620 HTMLPlugInElement* element, |
621 const KURL& url, | 621 const KURL& url, |
622 const Vector<String>& paramNames, | 622 const Vector<String>& paramNames, |
623 const Vector<String>& paramValues, | 623 const Vector<String>& paramValues, |
624 const String& mimeType, | 624 const String& mimeType, |
625 bool loadManually) | 625 bool loadManually) |
626 { | 626 { |
627 if (!m_webFrame->client()) | 627 if (!m_webFrame->client()) |
628 return 0; | 628 return nullptr; |
629 | 629 |
630 WebPluginParams params; | 630 WebPluginParams params; |
631 params.url = url; | 631 params.url = url; |
632 params.mimeType = mimeType; | 632 params.mimeType = mimeType; |
633 params.attributeNames = paramNames; | 633 params.attributeNames = paramNames; |
634 params.attributeValues = paramValues; | 634 params.attributeValues = paramValues; |
635 params.loadManually = loadManually; | 635 params.loadManually = loadManually; |
636 | 636 |
637 WebPlugin* webPlugin = m_webFrame->client()->createPlugin(m_webFrame, params
); | 637 WebPlugin* webPlugin = m_webFrame->client()->createPlugin(m_webFrame, params
); |
638 if (!webPlugin) | 638 if (!webPlugin) |
639 return 0; | 639 return nullptr; |
640 | 640 |
641 // The container takes ownership of the WebPlugin. | 641 // The container takes ownership of the WebPlugin. |
642 RefPtr<WebPluginContainerImpl> container = | 642 RefPtr<WebPluginContainerImpl> container = |
643 WebPluginContainerImpl::create(element, webPlugin); | 643 WebPluginContainerImpl::create(element, webPlugin); |
644 | 644 |
645 if (!webPlugin->initialize(container.get())) | 645 if (!webPlugin->initialize(container.get())) |
646 return 0; | 646 return nullptr; |
647 | 647 |
648 // The element might have been removed during plugin initialization! | 648 // The element might have been removed during plugin initialization! |
649 if (!element->renderer()) | 649 if (!element->renderer()) |
650 return 0; | 650 return nullptr; |
651 | 651 |
652 return container; | 652 return container; |
653 } | 653 } |
654 | 654 |
655 PassRefPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( | 655 PassRefPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( |
656 const IntSize& size, | 656 const IntSize& size, |
657 HTMLAppletElement* element, | 657 HTMLAppletElement* element, |
658 const KURL& /* baseURL */, | 658 const KURL& /* baseURL */, |
659 const Vector<String>& paramNames, | 659 const Vector<String>& paramNames, |
660 const Vector<String>& paramValues) | 660 const Vector<String>& paramValues) |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame,
client)); | 796 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame,
client)); |
797 } | 797 } |
798 | 798 |
799 void FrameLoaderClientImpl::didStopAllLoaders() | 799 void FrameLoaderClientImpl::didStopAllLoaders() |
800 { | 800 { |
801 if (m_webFrame->client()) | 801 if (m_webFrame->client()) |
802 m_webFrame->client()->didAbortLoading(m_webFrame); | 802 m_webFrame->client()->didAbortLoading(m_webFrame); |
803 } | 803 } |
804 | 804 |
805 } // namespace blink | 805 } // namespace blink |
OLD | NEW |