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

Unified Diff: Source/core/frame/DOMWindowEventHandlers.h

Issue 48603002: Implement WindowEventHandlers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DOMWindowEventHandlers.h
diff --git a/Source/platform/LengthPoint.h b/Source/core/frame/DOMWindowEventHandlers.h
similarity index 67%
copy from Source/platform/LengthPoint.h
copy to Source/core/frame/DOMWindowEventHandlers.h
index 75497a1dcc3447a9f6d0598f6e67c4ef7eb9cc6d..bf8977177729cee1ea0089f842592f7e1673089a 100644
--- a/Source/platform/LengthPoint.h
+++ b/Source/core/frame/DOMWindowEventHandlers.h
@@ -27,39 +27,27 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef LengthPoint_h
-#define LengthPoint_h
+#ifndef DOMWindowEventHandlers_h
+#define DOMWindowEventHandlers_h
-#include "platform/Length.h"
+#include "core/events/EventTarget.h"
namespace WebCore {
-struct LengthPoint {
-public:
- LengthPoint()
- {
- }
-
- LengthPoint(Length x, Length y)
- : m_x(x)
- , m_y(y)
- {
- }
-
- bool operator==(const LengthPoint& o) const { return m_x == o.m_x && m_y == o.m_y; }
- bool operator!=(const LengthPoint& o) const { return m_x != o.m_x || m_y != o.m_y; }
-
- void setX(Length x) { m_x = x; }
- Length x() const { return m_x; }
-
- void setY(Length y) { m_y = y; }
- Length y() const { return m_y; }
-
-private:
- Length m_x;
- Length m_y;
-};
-
-} // namespace WebCore
-
-#endif // LengthPoint_h
+namespace DOMWindowEventHandlers {
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(beforeunload);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(hashchange);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(message);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(offline);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(online);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(pagehide);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(pageshow);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(popstate);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(resize);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(storage);
+DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(unload);
+}
+
+} // namespace
+
+#endif
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698