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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/shadow/PluginPlaceholderElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PluginPlaceholderElement_h 5 #ifndef PluginPlaceholderElement_h
6 #define PluginPlaceholderElement_h 6 #define PluginPlaceholderElement_h
7 7
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/html/HTMLButtonElement.h"
9 #include "core/html/HTMLDivElement.h" 10 #include "core/html/HTMLDivElement.h"
11 #include "wtf/WeakPtr.h"
10 12
11 namespace blink { 13 namespace blink {
12 14
13 class PluginPlaceholderElement final : public HTMLDivElement { 15 class PluginPlaceholderElement final : public HTMLDivElement {
14 DEFINE_WRAPPERTYPEINFO(); 16 DEFINE_WRAPPERTYPEINFO();
15 public: 17 public:
16 static PassRefPtrWillBeRawPtr<PluginPlaceholderElement> create(Document&); 18 static PassRefPtrWillBeRawPtr<PluginPlaceholderElement> create(Document& doc ument)
19 {
20 RefPtrWillBeRawPtr<PluginPlaceholderElement> element = adoptRefWillBeNoo p(new PluginPlaceholderElement(document));
21 element->initialize();
22 return element.release();
23 }
24
25 ~PluginPlaceholderElement() override;
26 void trace(Visitor*) override;
17 27
18 void setMessage(const String&); 28 void setMessage(const String&);
19 void setIsCloseable(bool); 29 void setIsCloseable(bool);
20 30
21 private: 31 private:
22 explicit PluginPlaceholderElement(Document&); 32 explicit PluginPlaceholderElement(Document&);
33
34 void initialize();
35 PassRefPtr<EventListener> createSimpleEventListener(void(PluginPlaceholderEl ement::*)());
36
37 void onCloseButtonClick();
38
39 WeakPtrFactory<PluginPlaceholderElement> m_weakPtrFactory;
40 RefPtrWillBeMember<HTMLDivElement> m_messageElement;
41 RefPtrWillBeMember<HTMLButtonElement> m_closeButton;
23 }; 42 };
24 43
25 } // namespace blink 44 } // namespace blink
26 45
27 #endif // PluginPlaceholderElement_h 46 #endif // PluginPlaceholderElement_h
OLDNEW
« 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