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

Unified Diff: Source/core/html/shadow/PluginPlaceholderElement.h

Issue 740063002: Move creation of plugin placeholder DOM from JS to C++. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: oilpan Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/shadow/PluginPlaceholderElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/PluginPlaceholderElement.h
diff --git a/Source/core/html/shadow/PluginPlaceholderElement.h b/Source/core/html/shadow/PluginPlaceholderElement.h
index f6fb690fa0a51c2d9064125a9cd4743df2cdf95f..176362b9cbbf671d0c3e4690c8ca289bb2dfff8c 100644
--- a/Source/core/html/shadow/PluginPlaceholderElement.h
+++ b/Source/core/html/shadow/PluginPlaceholderElement.h
@@ -6,20 +6,39 @@
#define PluginPlaceholderElement_h
#include "core/dom/Element.h"
+#include "core/html/HTMLButtonElement.h"
#include "core/html/HTMLDivElement.h"
+#include "wtf/WeakPtr.h"
namespace blink {
class PluginPlaceholderElement final : public HTMLDivElement {
DEFINE_WRAPPERTYPEINFO();
public:
- static PassRefPtrWillBeRawPtr<PluginPlaceholderElement> create(Document&);
+ static PassRefPtrWillBeRawPtr<PluginPlaceholderElement> create(Document& document)
+ {
+ RefPtrWillBeRawPtr<PluginPlaceholderElement> element = adoptRefWillBeNoop(new PluginPlaceholderElement(document));
+ element->initialize();
+ return element.release();
+ }
+
+ ~PluginPlaceholderElement() override;
+ void trace(Visitor*) override;
void setMessage(const String&);
void setIsCloseable(bool);
private:
explicit PluginPlaceholderElement(Document&);
+
+ void initialize();
+ PassRefPtr<EventListener> createSimpleEventListener(void(PluginPlaceholderElement::*)());
+
+ void onCloseButtonClick();
+
+ WeakPtrFactory<PluginPlaceholderElement> m_weakPtrFactory;
+ RefPtrWillBeMember<HTMLDivElement> m_messageElement;
+ RefPtrWillBeMember<HTMLButtonElement> m_closeButton;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/html/shadow/PluginPlaceholderElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698