Home | History | Annotate | Download | only in cpp
      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 
     25 namespace WebCore {
     26 class EventTarget;
     27 };
     28 
     29 class WebDOMDedicatedWorkerContext;
     30 class WebDOMDOMApplicationCache;
     31 class WebDOMDOMWindow;
     32 class WebDOMEventSource;
     33 class WebDOMMessagePort;
     34 class WebDOMNode;
     35 class WebDOMNotification;
     36 class WebDOMSharedWorker;
     37 class WebDOMSharedWorkerContext;
     38 class WebDOMWebSocket;
     39 class WebDOMWorker;
     40 class WebDOMXMLHttpRequest;
     41 class WebDOMXMLHttpRequestUpload;
     42 
     43 class WebDOMEventTarget : public WebDOMObject {
     44 public:
     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&);
     68 protected:
     69     struct WebDOMEventTargetPrivate;
     70     WebDOMEventTargetPrivate* m_impl;
     71 };
     72 
     73 WebCore::EventTarget* toWebCore(const WebDOMEventTarget&);
     74 WebDOMEventTarget toWebKit(WebCore::EventTarget*);
     75 
     76 #endif
     77