OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebDOMEvent_h | 31 #ifndef WebDOMEvent_h |
32 #define WebDOMEvent_h | 32 #define WebDOMEvent_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
35 #include "../platform/WebPrivatePtr.h" | 35 #include "../platform/WebPrivatePtr.h" |
36 #include "../platform/WebString.h" | 36 #include "../platform/WebString.h" |
37 #include "WebNode.h" | 37 #include "WebNode.h" |
38 | 38 |
39 namespace WebCore { class Event; } | 39 namespace blink { class Event; } |
40 #if BLINK_IMPLEMENTATION | 40 #if BLINK_IMPLEMENTATION |
41 namespace WTF { template <typename T> class PassRefPtr; } | 41 namespace WTF { template <typename T> class PassRefPtr; } |
42 #endif | 42 #endif |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class WebDOMEvent { | 46 class WebDOMEvent { |
47 public: | 47 public: |
48 enum PhaseType { | 48 enum PhaseType { |
49 CapturingPhase = 1, | 49 CapturingPhase = 1, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 BLINK_EXPORT bool isMessageEvent() const; | 85 BLINK_EXPORT bool isMessageEvent() const; |
86 BLINK_EXPORT bool isWheelEvent() const; | 86 BLINK_EXPORT bool isWheelEvent() const; |
87 BLINK_EXPORT bool isBeforeTextInsertedEvent() const; | 87 BLINK_EXPORT bool isBeforeTextInsertedEvent() const; |
88 BLINK_EXPORT bool isOverflowEvent() const; | 88 BLINK_EXPORT bool isOverflowEvent() const; |
89 BLINK_EXPORT bool isPageTransitionEvent() const; | 89 BLINK_EXPORT bool isPageTransitionEvent() const; |
90 BLINK_EXPORT bool isPopStateEvent() const; | 90 BLINK_EXPORT bool isPopStateEvent() const; |
91 BLINK_EXPORT bool isProgressEvent() const; | 91 BLINK_EXPORT bool isProgressEvent() const; |
92 BLINK_EXPORT bool isXMLHttpRequestProgressEvent() const; | 92 BLINK_EXPORT bool isXMLHttpRequestProgressEvent() const; |
93 | 93 |
94 #if BLINK_IMPLEMENTATION | 94 #if BLINK_IMPLEMENTATION |
95 WebDOMEvent(const PassRefPtrWillBeRawPtr<WebCore::Event>&); | 95 WebDOMEvent(const PassRefPtrWillBeRawPtr<blink::Event>&); |
96 operator PassRefPtrWillBeRawPtr<WebCore::Event>() const; | 96 operator PassRefPtrWillBeRawPtr<blink::Event>() const; |
97 #endif | 97 #endif |
98 | 98 |
99 template<typename T> T to() | 99 template<typename T> T to() |
100 { | 100 { |
101 T res; | 101 T res; |
102 res.WebDOMEvent::assign(*this); | 102 res.WebDOMEvent::assign(*this); |
103 return res; | 103 return res; |
104 } | 104 } |
105 | 105 |
106 template<typename T> const T toConst() const | 106 template<typename T> const T toConst() const |
107 { | 107 { |
108 T res; | 108 T res; |
109 res.WebDOMEvent::assign(*this); | 109 res.WebDOMEvent::assign(*this); |
110 return res; | 110 return res; |
111 } | 111 } |
112 | 112 |
113 protected: | 113 protected: |
114 #if BLINK_IMPLEMENTATION | 114 #if BLINK_IMPLEMENTATION |
115 void assign(const PassRefPtrWillBeRawPtr<WebCore::Event>&); | 115 void assign(const PassRefPtrWillBeRawPtr<blink::Event>&); |
116 | 116 |
117 template<typename T> T* unwrap() | 117 template<typename T> T* unwrap() |
118 { | 118 { |
119 return static_cast<T*>(m_private.get()); | 119 return static_cast<T*>(m_private.get()); |
120 } | 120 } |
121 | 121 |
122 template<typename T> const T* constUnwrap() const | 122 template<typename T> const T* constUnwrap() const |
123 { | 123 { |
124 return static_cast<const T*>(m_private.get()); | 124 return static_cast<const T*>(m_private.get()); |
125 } | 125 } |
126 #endif | 126 #endif |
127 | 127 |
128 WebPrivatePtr<WebCore::Event> m_private; | 128 WebPrivatePtr<blink::Event> m_private; |
129 }; | 129 }; |
130 | 130 |
131 } // namespace blink | 131 } // namespace blink |
132 | 132 |
133 #endif | 133 #endif |
OLD | NEW |