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

Side by Side Diff: sky/engine/core/dom/custom/CustomElement.h

Issue 838463004: Remove embedder custom elements. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/custom/CustomElement.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 30 matching lines...) Expand all
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class CustomElementMicrotaskImportStep; 44 class CustomElementMicrotaskImportStep;
45 class Document; 45 class Document;
46 class Element; 46 class Element;
47 class HTMLImportChild; 47 class HTMLImportChild;
48 48
49 class CustomElement { 49 class CustomElement {
50 public: 50 public:
51 enum NameSet { 51 static bool isValidName(const AtomicString& name);
52 EmbedderNames = 1 << 0,
53 StandardNames = 1 << 1,
54 AllNames = EmbedderNames | StandardNames
55 };
56 static bool isValidName(const AtomicString& name, NameSet validNames = AllNa mes);
57 static void addEmbedderCustomElementName(const AtomicString& name);
58 52
59 // API to notify of document-level changes 53 // API to notify of document-level changes
60 static CustomElementMicrotaskImportStep* didCreateImport(HTMLImportChild*); 54 static CustomElementMicrotaskImportStep* didCreateImport(HTMLImportChild*);
61 static void didFinishLoadingImport(Document& master); 55 static void didFinishLoadingImport(Document& master);
62 56
63 // API for registration contexts 57 // API for registration contexts
64 static void define(Element*, PassRefPtr<CustomElementDefinition>); 58 static void define(Element*, PassRefPtr<CustomElementDefinition>);
65 59
66 // API for Element to kick off changes 60 // API for Element to kick off changes
67 61
68 static void attributeDidChange(Element*, const AtomicString& name, const Ato micString& oldValue, const AtomicString& newValue); 62 static void attributeDidChange(Element*, const AtomicString& name, const Ato micString& oldValue, const AtomicString& newValue);
69 static void didAttach(Element*, const Document&); 63 static void didAttach(Element*, const Document&);
70 static void didDetach(Element*, const Document&); 64 static void didDetach(Element*, const Document&);
71 static void wasDestroyed(Element*); 65 static void wasDestroyed(Element*);
72 66
73 private: 67 private:
74 CustomElement(); 68 CustomElement();
75
76 static Vector<AtomicString>& embedderCustomElementNames();
77 }; 69 };
78 70
79 } 71 }
80 72
81 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENT_H_ 73 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/custom/CustomElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698