Chromium Code Reviews| Index: Source/core/html/shadow/PluginPlaceholderElement.cpp |
| diff --git a/Source/core/html/shadow/PluginPlaceholderElement.cpp b/Source/core/html/shadow/PluginPlaceholderElement.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..91b9492608a3909b191ecd84b6b0e9537ff88365 |
| --- /dev/null |
| +++ b/Source/core/html/shadow/PluginPlaceholderElement.cpp |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "config.h" |
| +#include "core/html/shadow/PluginPlaceholderElement.h" |
| + |
| +#include "bindings/core/v8/V8PluginPlaceholderElement.h" |
| +#include "core/dom/Document.h" |
| +#include "wtf/Assertions.h" |
| + |
| +namespace blink { |
| + |
| +PluginPlaceholderElement::PluginPlaceholderElement(Document& document) |
| + : HTMLDivElement(document) |
|
esprehn
2014/09/09 04:13:30
We really need to stop having exotic <div>'s :/ I
jbroman
2014/09/09 14:05:23
Acknowledged.
|
| +{ |
| + ScriptWrappable::init(this); |
| +} |
| + |
| +PassRefPtrWillBeRawPtr<PluginPlaceholderElement> PluginPlaceholderElement::create(Document& document) |
| +{ |
| + RefPtrWillBeRawPtr<PluginPlaceholderElement> element = adoptRefWillBeNoop(new PluginPlaceholderElement(document)); |
| + bool success = V8PluginPlaceholderElement::PrivateScript::createCallbackMethod(document.frame(), element.get()); |
|
esprehn
2014/09/09 04:13:30
createdCallback, this should be just like a custom
jbroman
2014/09/09 14:05:23
Done.
|
| + ASSERT_UNUSED(success, success); |
| + return element.release(); |
| +} |
| + |
| +void PluginPlaceholderElement::setMessage(const String& message) |
| +{ |
| + bool success = V8PluginPlaceholderElement::PrivateScript::messageAttributeSetter(document().frame(), this, message); |
| + ASSERT_UNUSED(success, success); |
| +} |
| + |
| +v8::Handle<v8::Object> PluginPlaceholderElement::wrap(v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| +{ |
| + return blink::wrap(this, creationContext, isolate); |
| +} |
| + |
| +} // namespace blink |