1/* 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public License 15 * along with this library; see the file COPYING.LIB. If not, write to 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20#ifndef WebDOMEventTarget_h 21#define WebDOMEventTarget_h 22 23#include <WebDOMObject.h> 24 25namespace WebCore { 26class EventTarget; 27}; 28 29class WebDOMDedicatedWorkerContext; 30class WebDOMDOMApplicationCache; 31class WebDOMDOMWindow; 32class WebDOMEventSource; 33class WebDOMMessagePort; 34class WebDOMNode; 35class WebDOMNotification; 36class WebDOMSharedWorker; 37class WebDOMSharedWorkerContext; 38class WebDOMWebSocket; 39class WebDOMWorker; 40class WebDOMXMLHttpRequest; 41class WebDOMXMLHttpRequestUpload; 42 43class WebDOMEventTarget : public WebDOMObject { 44public: 45 WebDOMEventTarget(); 46 explicit WebDOMEventTarget(WebCore::EventTarget*); 47 WebDOMEventTarget(const WebDOMEventTarget&); 48 ~WebDOMEventTarget(); 49 50 WebCore::EventTarget* impl() const; 51 52 WebDOMNode toNode(); 53 WebDOMDOMWindow toDOMWindow(); 54 WebDOMXMLHttpRequest toXMLHttpRequest(); 55 WebDOMXMLHttpRequestUpload toXMLHttpRequestUpload(); 56 WebDOMMessagePort toMessagePort(); 57 58 WebDOMEventSource toEventSource(); 59 WebDOMDOMApplicationCache toDOMApplicationCache(); 60 WebDOMWorker toWorker(); 61 WebDOMDedicatedWorkerContext toDedicatedWorkerContext(); 62 WebDOMSharedWorker toSharedWorker(); 63 WebDOMSharedWorkerContext toSharedWorkerContext(); 64 WebDOMNotification toNotification(); 65 WebDOMWebSocket toWebSocket(); 66 67 WebDOMEventTarget& operator=(const WebDOMEventTarget&); 68protected: 69 struct WebDOMEventTargetPrivate; 70 WebDOMEventTargetPrivate* m_impl; 71}; 72 73WebCore::EventTarget* toWebCore(const WebDOMEventTarget&); 74WebDOMEventTarget toWebKit(WebCore::EventTarget*); 75 76#endif 77