| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "config.h" | |
| 6 #include "web/PluginPlaceholderImpl.h" | |
| 7 | |
| 8 #include "core/dom/shadow/ShadowRoot.h" | |
| 9 #include "core/html/HTMLPlugInElement.h" | |
| 10 #include "core/html/shadow/PluginPlaceholderElement.h" | |
| 11 #include "public/web/WebPluginPlaceholder.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 PluginPlaceholderImpl::PluginPlaceholderImpl(PassOwnPtr<WebPluginPlaceholder> we
bPluginPlaceholder, Document& document) | |
| 16 : m_webPluginPlaceholder(webPluginPlaceholder) | |
| 17 , m_placeholderElement(PluginPlaceholderElement::create(document)) | |
| 18 { | |
| 19 ASSERT(m_webPluginPlaceholder); | |
| 20 } | |
| 21 | |
| 22 PluginPlaceholderImpl::~PluginPlaceholderImpl() | |
| 23 { | |
| 24 } | |
| 25 | |
| 26 DEFINE_TRACE(PluginPlaceholderImpl) | |
| 27 { | |
| 28 visitor->trace(m_placeholderElement); | |
| 29 } | |
| 30 | |
| 31 void PluginPlaceholderImpl::loadIntoContainer(ContainerNode& container) | |
| 32 { | |
| 33 m_placeholderElement->remove(ASSERT_NO_EXCEPTION); | |
| 34 update(); | |
| 35 container.removeChildren(); | |
| 36 container.appendChild(m_placeholderElement); | |
| 37 } | |
| 38 | |
| 39 void PluginPlaceholderImpl::update() | |
| 40 { | |
| 41 m_placeholderElement->setMessage(m_webPluginPlaceholder->message()); | |
| 42 m_placeholderElement->setIsCloseable(m_webPluginPlaceholder->isCloseable()); | |
| 43 } | |
| 44 | |
| 45 } // namespace blink | |
| OLD | NEW |