Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: Source/web/PluginPlaceholderImpl.cpp

Issue 1313763002: Blink Plugins: Remove Shadow DOM Plugin Placeholder (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge origin/master Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/PluginPlaceholderImpl.h ('k') | Source/web/web.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « Source/web/PluginPlaceholderImpl.h ('k') | Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698