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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 WebHelperPluginImpl::WebHelperPluginImpl() | 53 WebHelperPluginImpl::WebHelperPluginImpl() |
54 : m_destructionTimer(this, &WebHelperPluginImpl::reallyDestroy) {} | 54 : m_destructionTimer(this, &WebHelperPluginImpl::reallyDestroy) {} |
55 | 55 |
56 bool WebHelperPluginImpl::initialize(const String& pluginType, | 56 bool WebHelperPluginImpl::initialize(const String& pluginType, |
57 WebLocalFrameImpl* frame) { | 57 WebLocalFrameImpl* frame) { |
58 DCHECK(!m_objectElement && !m_pluginContainer); | 58 DCHECK(!m_objectElement && !m_pluginContainer); |
59 if (!frame->frame()->loader().client()) | 59 if (!frame->frame()->loader().client()) |
60 return false; | 60 return false; |
61 | 61 |
62 m_objectElement = | 62 m_objectElement = |
63 HTMLObjectElement::create(*frame->frame()->document(), 0, false); | 63 HTMLObjectElement::create(*frame->frame()->document(), false); |
64 Vector<String> attributeNames; | 64 Vector<String> attributeNames; |
65 Vector<String> attributeValues; | 65 Vector<String> attributeValues; |
66 DCHECK(frame->frame()->document()->url().isValid()); | 66 DCHECK(frame->frame()->document()->url().isValid()); |
67 m_pluginContainer = | 67 m_pluginContainer = |
68 toWebPluginContainerImpl(frame->frame()->loader().client()->createPlugin( | 68 toWebPluginContainerImpl(frame->frame()->loader().client()->createPlugin( |
69 m_objectElement.get(), frame->frame()->document()->url(), | 69 m_objectElement.get(), frame->frame()->document()->url(), |
70 attributeNames, attributeValues, pluginType, false, | 70 attributeNames, attributeValues, pluginType, false, |
71 FrameLoaderClient::AllowDetachedPlugin)); | 71 FrameLoaderClient::AllowDetachedPlugin)); |
72 | 72 |
73 if (!m_pluginContainer) | 73 if (!m_pluginContainer) |
(...skipping 20 matching lines...) Expand all Loading... |
94 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE); | 94 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE); |
95 } | 95 } |
96 | 96 |
97 WebPlugin* WebHelperPluginImpl::getPlugin() { | 97 WebPlugin* WebHelperPluginImpl::getPlugin() { |
98 DCHECK(m_pluginContainer); | 98 DCHECK(m_pluginContainer); |
99 DCHECK(m_pluginContainer->plugin()); | 99 DCHECK(m_pluginContainer->plugin()); |
100 return m_pluginContainer->plugin(); | 100 return m_pluginContainer->plugin(); |
101 } | 101 } |
102 | 102 |
103 } // namespace blink | 103 } // namespace blink |
OLD | NEW |