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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementDefinitionBuilder.h

Issue 2828643002: Make customElements.define faster
Patch Set: Remove some unneeded casts. Created 3 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 CustomElementDefinitionBuilder_h 5 #ifndef CustomElementDefinitionBuilder_h
6 #define CustomElementDefinitionBuilder_h 6 #define CustomElementDefinitionBuilder_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/custom/CustomElementDefinition.h"
9 #include "platform/wtf/Allocator.h" 10 #include "platform/wtf/Allocator.h"
10 #include "platform/wtf/Noncopyable.h" 11 #include "platform/wtf/Noncopyable.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class CustomElementDefinition;
15 class CustomElementDescriptor; 15 class CustomElementDescriptor;
16 class CustomElementRegistry; 16 class CustomElementRegistry;
17 17
18 // Implement CustomElementDefinitionBuilder to provide 18 // Implement CustomElementDefinitionBuilder to provide
19 // technology-specific steps for CustomElementRegistry.define. 19 // technology-specific steps for CustomElementRegistry.define.
20 // https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregis try-define 20 // https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregis try-define
21 class CORE_EXPORT CustomElementDefinitionBuilder { 21 class CORE_EXPORT CustomElementDefinitionBuilder {
22 STACK_ALLOCATED(); 22 STACK_ALLOCATED();
23 WTF_MAKE_NONCOPYABLE(CustomElementDefinitionBuilder); 23 WTF_MAKE_NONCOPYABLE(CustomElementDefinitionBuilder);
24 24
(...skipping 14 matching lines...) Expand all
39 39
40 // Checking the prototype may destroy the window. Return false if 40 // Checking the prototype may destroy the window. Return false if
41 // processing should not proceed. 41 // processing should not proceed.
42 virtual bool CheckPrototype() = 0; 42 virtual bool CheckPrototype() = 0;
43 43
44 // Cache properties for build to use. Return false if processing 44 // Cache properties for build to use. Return false if processing
45 // should not proceed. 45 // should not proceed.
46 virtual bool RememberOriginalProperties() = 0; 46 virtual bool RememberOriginalProperties() = 0;
47 47
48 // Produce the definition. This must produce a definition. 48 // Produce the definition. This must produce a definition.
49 virtual CustomElementDefinition* Build(const CustomElementDescriptor&) = 0; 49 virtual CustomElementDefinition* Build(const CustomElementDescriptor&,
50 CustomElementDefinition::Id) = 0;
50 }; 51 };
51 52
52 } // namespace blink 53 } // namespace blink
53 54
54 #endif // CustomElementDefinitionBuilder_h 55 #endif // CustomElementDefinitionBuilder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698