OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 DisplayItem_h | 5 #ifndef DisplayItem_h |
6 #define DisplayItem_h | 6 #define DisplayItem_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "wtf/Assertions.h" | 9 #include "wtf/Assertions.h" |
10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 static WTF::String typeAsDebugString(DisplayItem::Type); | 112 static WTF::String typeAsDebugString(DisplayItem::Type); |
113 | 113 |
114 void setClientDebugString(const WTF::String& clientDebugString) { m_clientDe
bugString = clientDebugString; } | 114 void setClientDebugString(const WTF::String& clientDebugString) { m_clientDe
bugString = clientDebugString; } |
115 const WTF::String& clientDebugString() const { return m_clientDebugString; } | 115 const WTF::String& clientDebugString() const { return m_clientDebugString; } |
116 | 116 |
117 WTF::String asDebugString() const; | 117 WTF::String asDebugString() const; |
118 virtual const char* name() const { return "Dummy"; } | 118 virtual const char* name() const { return "Dummy"; } |
119 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const; | 119 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const; |
120 #endif | 120 #endif |
121 | 121 |
| 122 // FIXME: Replace these virtual functions with static field access. |
122 virtual bool isCached() const { return false; } | 123 virtual bool isCached() const { return false; } |
| 124 virtual bool isSubtreeCached() const { return false; } |
| 125 virtual bool isBeginSubtree() const { return false; } |
| 126 virtual bool isEndSubtree() const { return false; } |
123 | 127 |
124 protected: | 128 protected: |
125 DisplayItem(DisplayItemClient client, Type type) | 129 DisplayItem(DisplayItemClient client, Type type) |
126 : m_id(client, type) | 130 : m_id(client, type) |
127 { | 131 { |
128 ASSERT(client); | 132 ASSERT(client); |
129 } | 133 } |
130 | 134 |
131 private: | 135 private: |
132 struct Id { | 136 struct Id { |
133 Id(DisplayItemClient c, Type t) | 137 Id(DisplayItemClient c, Type t) |
134 : client(c) | 138 : client(c) |
135 , type(t) | 139 , type(t) |
136 { | 140 { |
137 ASSERT(client); | 141 ASSERT(client); |
138 } | 142 } |
139 | 143 |
140 const DisplayItemClient client; | 144 const DisplayItemClient client; |
141 const Type type; | 145 const Type type; |
142 } m_id; | 146 } m_id; |
143 #ifndef NDEBUG | 147 #ifndef NDEBUG |
144 WTF::String m_clientDebugString; | 148 WTF::String m_clientDebugString; |
145 #endif | 149 #endif |
146 }; | 150 }; |
147 | 151 |
148 } | 152 } |
149 | 153 |
150 #endif // DisplayItem_h | 154 #endif // DisplayItem_h |
OLD | NEW |