| 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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 params.loadManually = loadManually; | 769 params.loadManually = loadManually; |
| 770 | 770 |
| 771 WebPlugin* webPlugin = m_webFrame->client()->createPlugin(m_webFrame, params
); | 771 WebPlugin* webPlugin = m_webFrame->client()->createPlugin(m_webFrame, params
); |
| 772 if (!webPlugin) | 772 if (!webPlugin) |
| 773 return nullptr; | 773 return nullptr; |
| 774 | 774 |
| 775 // The container takes ownership of the WebPlugin. | 775 // The container takes ownership of the WebPlugin. |
| 776 RefPtrWillBeRawPtr<WebPluginContainerImpl> container = | 776 RefPtrWillBeRawPtr<WebPluginContainerImpl> container = |
| 777 WebPluginContainerImpl::create(element, webPlugin); | 777 WebPluginContainerImpl::create(element, webPlugin); |
| 778 | 778 |
| 779 if (!webPlugin->initialize(container.get())) { | 779 if (!webPlugin->initialize(container.get())) |
| 780 #if ENABLE(OILPAN) | |
| 781 container->dispose(); | |
| 782 #endif | |
| 783 return nullptr; | 780 return nullptr; |
| 784 } | |
| 785 | 781 |
| 786 if (policy != AllowDetachedPlugin && !element->layoutObject()) { | 782 if (policy != AllowDetachedPlugin && !element->layoutObject()) |
| 787 #if ENABLE(OILPAN) | |
| 788 container->dispose(); | |
| 789 #endif | |
| 790 return nullptr; | 783 return nullptr; |
| 791 } | |
| 792 | 784 |
| 793 return container; | 785 return container; |
| 794 } | 786 } |
| 795 | 787 |
| 796 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( | 788 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( |
| 797 HTMLMediaElement& htmlMediaElement, | 789 HTMLMediaElement& htmlMediaElement, |
| 798 const WebURL& url, | 790 const WebURL& url, |
| 799 WebMediaPlayerClient* client) | 791 WebMediaPlayerClient* client) |
| 800 { | 792 { |
| 801 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( | 793 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 | 983 |
| 992 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 984 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
| 993 { | 985 { |
| 994 if (m_webFrame->client()) { | 986 if (m_webFrame->client()) { |
| 995 m_webFrame->client()->suddenTerminationDisablerChanged( | 987 m_webFrame->client()->suddenTerminationDisablerChanged( |
| 996 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 988 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
| 997 } | 989 } |
| 998 } | 990 } |
| 999 | 991 |
| 1000 } // namespace blink | 992 } // namespace blink |
| OLD | NEW |