Chromium Code Reviews| Index: public/web/WebRange.h |
| diff --git a/public/web/WebRange.h b/public/web/WebRange.h |
| index 5d463f8a99b44cafb85dfbc83db393d56ec44831..cd318a1cf1f110eaae6731975d20ec4be621dead 100644 |
| --- a/public/web/WebRange.h |
| +++ b/public/web/WebRange.h |
| @@ -31,20 +31,17 @@ |
| #ifndef WebRange_h |
| #define WebRange_h |
| -#include "../platform/WebCommon.h" |
| -#include "../platform/WebVector.h" |
| #include "WebFrame.h" |
| +#include "public/platform/WebCommon.h" |
| +#include "public/platform/WebPrivatePtr.h" |
| +#include "public/platform/WebVector.h" |
| -#if BLINK_IMPLEMENTATION |
| namespace WebCore { class Range; } |
| -namespace WTF { template <typename T> class PassRefPtr; } |
| -#endif |
| namespace blink { |
| struct WebFloatQuad; |
| class WebNode; |
| -class WebRangePrivate; |
| class WebString; |
| // Provides readonly access to some properties of a DOM range. |
| @@ -52,8 +49,8 @@ class WebRange { |
| public: |
| ~WebRange() { reset(); } |
| - WebRange() : m_private(0) { } |
| - WebRange(const WebRange& r) : m_private(0) { assign(r); } |
| + WebRange() { } |
| + WebRange(const WebRange& r) { assign(r); } |
| WebRange& operator=(const WebRange& r) |
| { |
| assign(r); |
| @@ -63,7 +60,7 @@ public: |
| BLINK_EXPORT void reset(); |
| BLINK_EXPORT void assign(const WebRange&); |
| - bool isNull() const { return !m_private; } |
| + bool isNull() const { return m_private.isNull(); } |
|
haraken
2014/04/04 02:30:19
If we forget to change this, is there any way to n
sof
2014/04/04 07:33:23
If I understand your question correctly, then yes
|
| BLINK_EXPORT int startOffset() const; |
| BLINK_EXPORT int endOffset() const; |
| @@ -80,14 +77,12 @@ public: |
| BLINK_EXPORT WebVector<WebFloatQuad> textQuads() const; |
| #if BLINK_IMPLEMENTATION |
| - WebRange(const WTF::PassRefPtr<WebCore::Range>&); |
| - WebRange& operator=(const WTF::PassRefPtr<WebCore::Range>&); |
| - operator WTF::PassRefPtr<WebCore::Range>() const; |
| + WebRange(const PassRefPtrWillBeRawPtr<WebCore::Range>&); |
| + operator PassRefPtrWillBeRawPtr<WebCore::Range>() const; |
| #endif |
| private: |
| - void assign(WebRangePrivate*); |
| - WebRangePrivate* m_private; |
| + WebPrivatePtr<WebCore::Range> m_private; |
| }; |
| } // namespace blink |