Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: public/web/WebDOMEvent.h

Issue 455883003: Cleanup namespace usage in public/web/Web[A-M]*.h. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « public/web/WebDOMError.h ('k') | public/web/WebDOMFileSystem.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 blink { class Event; }
40 #if BLINK_IMPLEMENTATION 39 #if BLINK_IMPLEMENTATION
41 namespace WTF { template <typename T> class PassRefPtr; } 40 namespace WTF { template <typename T> class PassRefPtr; }
42 #endif 41 #endif
43 42
44 namespace blink { 43 namespace blink {
45 44
45 class Event;
46
46 class WebDOMEvent { 47 class WebDOMEvent {
47 public: 48 public:
48 enum PhaseType { 49 enum PhaseType {
49 CapturingPhase = 1, 50 CapturingPhase = 1,
50 AtTarget = 2, 51 AtTarget = 2,
51 BubblingPhase = 3 52 BubblingPhase = 3
52 }; 53 };
53 54
54 ~WebDOMEvent() { reset(); } 55 ~WebDOMEvent() { reset(); }
55 56
(...skipping 29 matching lines...) Expand all
85 BLINK_EXPORT bool isMessageEvent() const; 86 BLINK_EXPORT bool isMessageEvent() const;
86 BLINK_EXPORT bool isWheelEvent() const; 87 BLINK_EXPORT bool isWheelEvent() const;
87 BLINK_EXPORT bool isBeforeTextInsertedEvent() const; 88 BLINK_EXPORT bool isBeforeTextInsertedEvent() const;
88 BLINK_EXPORT bool isOverflowEvent() const; 89 BLINK_EXPORT bool isOverflowEvent() const;
89 BLINK_EXPORT bool isPageTransitionEvent() const; 90 BLINK_EXPORT bool isPageTransitionEvent() const;
90 BLINK_EXPORT bool isPopStateEvent() const; 91 BLINK_EXPORT bool isPopStateEvent() const;
91 BLINK_EXPORT bool isProgressEvent() const; 92 BLINK_EXPORT bool isProgressEvent() const;
92 BLINK_EXPORT bool isXMLHttpRequestProgressEvent() const; 93 BLINK_EXPORT bool isXMLHttpRequestProgressEvent() const;
93 94
94 #if BLINK_IMPLEMENTATION 95 #if BLINK_IMPLEMENTATION
95 WebDOMEvent(const PassRefPtrWillBeRawPtr<blink::Event>&); 96 WebDOMEvent(const PassRefPtrWillBeRawPtr<Event>&);
96 operator PassRefPtrWillBeRawPtr<blink::Event>() const; 97 operator PassRefPtrWillBeRawPtr<Event>() const;
97 #endif 98 #endif
98 99
99 template<typename T> T to() 100 template<typename T> T to()
100 { 101 {
101 T res; 102 T res;
102 res.WebDOMEvent::assign(*this); 103 res.WebDOMEvent::assign(*this);
103 return res; 104 return res;
104 } 105 }
105 106
106 template<typename T> const T toConst() const 107 template<typename T> const T toConst() const
107 { 108 {
108 T res; 109 T res;
109 res.WebDOMEvent::assign(*this); 110 res.WebDOMEvent::assign(*this);
110 return res; 111 return res;
111 } 112 }
112 113
113 protected: 114 protected:
114 #if BLINK_IMPLEMENTATION 115 #if BLINK_IMPLEMENTATION
115 void assign(const PassRefPtrWillBeRawPtr<blink::Event>&); 116 void assign(const PassRefPtrWillBeRawPtr<Event>&);
116 117
117 template<typename T> T* unwrap() 118 template<typename T> T* unwrap()
118 { 119 {
119 return static_cast<T*>(m_private.get()); 120 return static_cast<T*>(m_private.get());
120 } 121 }
121 122
122 template<typename T> const T* constUnwrap() const 123 template<typename T> const T* constUnwrap() const
123 { 124 {
124 return static_cast<const T*>(m_private.get()); 125 return static_cast<const T*>(m_private.get());
125 } 126 }
126 #endif 127 #endif
127 128
128 WebPrivatePtr<blink::Event> m_private; 129 WebPrivatePtr<Event> m_private;
129 }; 130 };
130 131
131 } // namespace blink 132 } // namespace blink
132 133
133 #endif 134 #endif
OLDNEW
« no previous file with comments | « public/web/WebDOMError.h ('k') | public/web/WebDOMFileSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698