1 // Copyright 2016 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 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CUSTOM_CUSTOM_ELEMENT_REACTION_H_
6 #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CUSTOM_CUSTOM_ELEMENT_REACTION_H_
7 
8 #include "base/macros.h"
9 #include "third_party/blink/renderer/core/core_export.h"
10 #include "third_party/blink/renderer/platform/heap/handle.h"
11 
12 namespace blink {
13 
14 class CustomElementDefinition;
15 class Element;
16 
17 class CORE_EXPORT CustomElementReaction
18     : public GarbageCollected<CustomElementReaction> {
19  public:
20   CustomElementReaction(CustomElementDefinition&);
21   virtual ~CustomElementReaction() = default;
22 
23   virtual void Invoke(Element&) = 0;
24 
25   virtual void Trace(Visitor*);
26 
27  protected:
28   Member<CustomElementDefinition> definition_;
29 
30   DISALLOW_COPY_AND_ASSIGN(CustomElementReaction);
31 };
32 
33 }  // namespace blink
34 
35 #endif  // THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CUSTOM_CUSTOM_ELEMENT_REACTION_H_
36