Index: Source/WebKit/chromium/public/WebDOMEvent.h |
diff --git a/Source/WebKit/chromium/public/WebDOMEvent.h b/Source/WebKit/chromium/public/WebDOMEvent.h |
index d85648d8750ae859cb9deba52b659726554f531c..79068c63d2fe8cfda3c4b077820a4fb1ee09f10e 100644 |
--- a/Source/WebKit/chromium/public/WebDOMEvent.h |
+++ b/Source/WebKit/chromium/public/WebDOMEvent.h |
@@ -32,6 +32,7 @@ |
#define WebDOMEvent_h |
#include "../../../../public/platform/WebCommon.h" |
+#include "../../../../public/platform/WebPrivatePtr.h" |
#include "../../../../public/platform/WebString.h" |
#include "WebNode.h" |
@@ -52,8 +53,8 @@ public: |
~WebDOMEvent() { reset(); } |
- WebDOMEvent() : m_private(0) { } |
- WebDOMEvent(const WebDOMEvent& e) : m_private(0) { assign(e); } |
+ WebDOMEvent() { } |
+ WebDOMEvent(const WebDOMEvent&); |
dmichael (off chromium)
2013/05/22 16:08:28
I moved this to the body so that I could use the W
abarth-chromium
2013/05/22 16:21:49
It's probably better to do this using the same pat
|
WebDOMEvent& operator=(const WebDOMEvent& e) |
{ |
assign(e); |
@@ -63,7 +64,7 @@ public: |
WEBKIT_EXPORT void reset(); |
WEBKIT_EXPORT void assign(const WebDOMEvent&); |
- bool isNull() const { return !m_private; } |
+ bool isNull() const { return m_private.isNull(); } |
WEBKIT_EXPORT WebString type() const; |
WEBKIT_EXPORT WebNode target() const; |
@@ -112,18 +113,21 @@ public: |
protected: |
typedef WebCore::Event WebDOMEventPrivate; |
- void assign(WebDOMEventPrivate*); |
- WebDOMEventPrivate* m_private; |
+#if WEBKIT_IMPLEMENTATION |
+ void assign(const WTF::PassRefPtr<WebDOMEventPrivate>&); |
template<typename T> T* unwrap() |
{ |
- return static_cast<T*>(m_private); |
+ return static_cast<T*>(m_private.get()); |
} |
template<typename T> const T* constUnwrap() const |
{ |
- return static_cast<const T*>(m_private); |
+ return static_cast<const T*>(m_private.get()); |
} |
+#endif |
+ |
+ WebPrivatePtr<WebDOMEventPrivate> m_private; |
}; |
} // namespace WebKit |