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

Side by Side Diff: sky/engine/core/dom/StaticNodeList.h

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 static PassRefPtr<StaticNodeTypeList> createEmpty() 48 static PassRefPtr<StaticNodeTypeList> createEmpty()
49 { 49 {
50 return adoptRef(new StaticNodeTypeList); 50 return adoptRef(new StaticNodeTypeList);
51 } 51 }
52 52
53 virtual ~StaticNodeTypeList(); 53 virtual ~StaticNodeTypeList();
54 54
55 virtual unsigned length() const override; 55 virtual unsigned length() const override;
56 virtual NodeType* item(unsigned index) const override; 56 virtual NodeType* item(unsigned index) const override;
57 57
58 virtual void trace(Visitor*) override;
59
60 private: 58 private:
61 ptrdiff_t AllocationSize() 59 ptrdiff_t AllocationSize()
62 { 60 {
63 return m_nodes.capacity() * sizeof(RefPtr<NodeType>); 61 return m_nodes.capacity() * sizeof(RefPtr<NodeType>);
64 } 62 }
65 63
66 Vector<RefPtr<NodeType> > m_nodes; 64 Vector<RefPtr<NodeType> > m_nodes;
67 }; 65 };
68 66
69 typedef StaticNodeTypeList<Node> StaticNodeList; 67 typedef StaticNodeTypeList<Node> StaticNodeList;
(...skipping 21 matching lines...) Expand all
91 } 89 }
92 90
93 template <typename NodeType> 91 template <typename NodeType>
94 NodeType* StaticNodeTypeList<NodeType>::item(unsigned index) const 92 NodeType* StaticNodeTypeList<NodeType>::item(unsigned index) const
95 { 93 {
96 if (index < m_nodes.size()) 94 if (index < m_nodes.size())
97 return m_nodes[index].get(); 95 return m_nodes[index].get();
98 return 0; 96 return 0;
99 } 97 }
100 98
101 template <typename NodeType>
102 void StaticNodeTypeList<NodeType>::trace(Visitor* visitor)
103 {
104 visitor->trace(m_nodes);
105 NodeList::trace(visitor);
106 }
107
108 } // namespace blink 99 } // namespace blink
109 100
110 #endif // StaticNodeList_h 101 #endif // StaticNodeList_h
OLDNEW
« no previous file with comments | « sky/engine/core/dom/ShadowTreeStyleSheetCollection.h ('k') | sky/engine/core/dom/StyleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698