From 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:05:15 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- WebCore/dom/UIEvent.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'WebCore/dom/UIEvent.h') diff --git a/WebCore/dom/UIEvent.h b/WebCore/dom/UIEvent.h index 9c5e0cd..8e330a5 100644 --- a/WebCore/dom/UIEvent.h +++ b/WebCore/dom/UIEvent.h @@ -1,10 +1,8 @@ /* - * This file is part of the DOM implementation for KDE. - * * Copyright (C) 2001 Peter Kelly (pmk@post.com) * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) - * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. + * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -26,21 +24,26 @@ #ifndef UIEvent_h #define UIEvent_h +#include "DOMWindow.h" #include "Event.h" namespace WebCore { - class DOMWindow; - typedef DOMWindow AbstractView; class UIEvent : public Event { public: - UIEvent(); - UIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail); + static PassRefPtr create() + { + return adoptRef(new UIEvent); + } + static PassRefPtr create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr view, int detail) + { + return adoptRef(new UIEvent(type, canBubble, cancelable, view, detail)); + } virtual ~UIEvent(); - void initUIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail); + void initUIEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr, int detail); AbstractView* view() const { return m_view.get(); } int detail() const { return m_detail; } @@ -58,6 +61,10 @@ namespace WebCore { virtual int which() const; + protected: + UIEvent(); + UIEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr, int detail); + private: RefPtr m_view; int m_detail; -- cgit v1.1