OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 10 matching lines...) Expand all Loading... |
21 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 21 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
27 * SUCH DAMAGE. | 27 * SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 #include "NamedFlowCollection.h" | 31 #include "core/dom/NamedFlowCollection.h" |
32 | 32 |
33 #include "DOMNamedFlowCollection.h" | |
34 #include "Document.h" | |
35 #include "InspectorInstrumentation.h" | 33 #include "InspectorInstrumentation.h" |
36 #include "NamedFlow.h" | 34 #include "core/dom/DOMNamedFlowCollection.h" |
| 35 #include "core/dom/Document.h" |
| 36 #include "core/dom/NamedFlow.h" |
37 | 37 |
38 #include <wtf/text/StringHash.h> | 38 #include <wtf/text/StringHash.h> |
39 #include <wtf/text/WTFString.h> | 39 #include <wtf/text/WTFString.h> |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 NamedFlowCollection::NamedFlowCollection(Document* document) | 43 NamedFlowCollection::NamedFlowCollection(Document* document) |
44 : ContextDestructionObserver(document) | 44 : ContextDestructionObserver(document) |
45 { | 45 { |
46 } | 46 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 static const bool safeToCompareToEmptyOrDeleted = true; | 123 static const bool safeToCompareToEmptyOrDeleted = true; |
124 }; | 124 }; |
125 | 125 |
126 // The HashTranslator is used to lookup a NamedFlow in the set using a name. | 126 // The HashTranslator is used to lookup a NamedFlow in the set using a name. |
127 struct NamedFlowCollection::NamedFlowHashTranslator { | 127 struct NamedFlowCollection::NamedFlowHashTranslator { |
128 static unsigned hash(const String& key) { return DefaultHash<String>::Hash::
hash(key); } | 128 static unsigned hash(const String& key) { return DefaultHash<String>::Hash::
hash(key); } |
129 static bool equal(NamedFlow* a, const String& b) { return a->name() == b; } | 129 static bool equal(NamedFlow* a, const String& b) { return a->name() == b; } |
130 }; | 130 }; |
131 | 131 |
132 } // namespace WebCore | 132 } // namespace WebCore |
OLD | NEW |