OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 { | 140 { |
141 T res; | 141 T res; |
142 res.WebNode::assign(*this); | 142 res.WebNode::assign(*this); |
143 return res; | 143 return res; |
144 } | 144 } |
145 | 145 |
146 #if BLINK_IMPLEMENTATION | 146 #if BLINK_IMPLEMENTATION |
147 WebNode(const PassRefPtrWillBeRawPtr<WebCore::Node>&); | 147 WebNode(const PassRefPtrWillBeRawPtr<WebCore::Node>&); |
148 WebNode& operator=(const PassRefPtrWillBeRawPtr<WebCore::Node>&); | 148 WebNode& operator=(const PassRefPtrWillBeRawPtr<WebCore::Node>&); |
149 operator PassRefPtrWillBeRawPtr<WebCore::Node>() const; | 149 operator PassRefPtrWillBeRawPtr<WebCore::Node>() const; |
150 #if ENABLE(OILPAN) | |
151 // This constructor enables creation of WebNodes from Members | |
152 // holding WebCore::Node-derived objects (this shows up in WebVector | |
153 // assignments, for instance.) It is needed because a RawPtr<T> constructor | |
154 // from a Member<U> isn't provided, hence the above constructor | |
155 // won't be usable. | |
156 template<typename U> | |
157 WebNode(const WebCore::Member<U>& other, EnsurePtrConvertibleArgDecl(U, WebC
ore::Node)) | |
158 : m_private(other.get()) | |
159 { | |
160 } | |
161 #endif | |
162 #endif | 150 #endif |
163 | 151 |
164 #if BLINK_IMPLEMENTATION | 152 #if BLINK_IMPLEMENTATION |
165 template<typename T> T* unwrap() | 153 template<typename T> T* unwrap() |
166 { | 154 { |
167 return static_cast<T*>(m_private.get()); | 155 return static_cast<T*>(m_private.get()); |
168 } | 156 } |
169 | 157 |
170 template<typename T> const T* constUnwrap() const | 158 template<typename T> const T* constUnwrap() const |
171 { | 159 { |
(...skipping 16 matching lines...) Expand all Loading... |
188 } | 176 } |
189 | 177 |
190 inline bool operator<(const WebNode& a, const WebNode& b) | 178 inline bool operator<(const WebNode& a, const WebNode& b) |
191 { | 179 { |
192 return a.lessThan(b); | 180 return a.lessThan(b); |
193 } | 181 } |
194 | 182 |
195 } // namespace blink | 183 } // namespace blink |
196 | 184 |
197 #endif | 185 #endif |
OLD | NEW |