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

Side by Side Diff: WebCore/dom/EventTarget.h

Issue 155079: WebSocket implementation in WebKit (Closed)
Patch Set: Rewrite to use SocketStreamHandle Created 11 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
« no previous file with comments | « WebCore/dom/EventNames.h ('k') | WebCore/dom/EventTarget.cpp » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 30 matching lines...) Expand all
41 class DedicatedWorkerContext; 41 class DedicatedWorkerContext;
42 class DOMApplicationCache; 42 class DOMApplicationCache;
43 class DOMWindow; 43 class DOMWindow;
44 class Event; 44 class Event;
45 class EventListener; 45 class EventListener;
46 class MessagePort; 46 class MessagePort;
47 class Node; 47 class Node;
48 class SVGElementInstance; 48 class SVGElementInstance;
49 class ScriptExecutionContext; 49 class ScriptExecutionContext;
50 class SharedWorker; 50 class SharedWorker;
51 class WebSocket;
51 class Worker; 52 class Worker;
52 class XMLHttpRequest; 53 class XMLHttpRequest;
53 class XMLHttpRequestUpload; 54 class XMLHttpRequestUpload;
54 55
55 typedef int ExceptionCode; 56 typedef int ExceptionCode;
56 57
57 class EventTarget { 58 class EventTarget {
58 public: 59 public:
59 virtual MessagePort* toMessagePort(); 60 virtual MessagePort* toMessagePort();
60 virtual Node* toNode(); 61 virtual Node* toNode();
61 virtual DOMWindow* toDOMWindow(); 62 virtual DOMWindow* toDOMWindow();
62 virtual XMLHttpRequest* toXMLHttpRequest(); 63 virtual XMLHttpRequest* toXMLHttpRequest();
63 virtual XMLHttpRequestUpload* toXMLHttpRequestUpload(); 64 virtual XMLHttpRequestUpload* toXMLHttpRequestUpload();
64 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 65 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
65 virtual DOMApplicationCache* toDOMApplicationCache(); 66 virtual DOMApplicationCache* toDOMApplicationCache();
66 #endif 67 #endif
67 #if ENABLE(SVG) 68 #if ENABLE(SVG)
68 virtual SVGElementInstance* toSVGElementInstance(); 69 virtual SVGElementInstance* toSVGElementInstance();
69 #endif 70 #endif
70 #if ENABLE(WORKERS) 71 #if ENABLE(WORKERS)
71 virtual Worker* toWorker(); 72 virtual Worker* toWorker();
72 virtual DedicatedWorkerContext* toDedicatedWorkerContext(); 73 virtual DedicatedWorkerContext* toDedicatedWorkerContext();
73 #endif 74 #endif
74
75 #if ENABLE(SHARED_WORKERS) 75 #if ENABLE(SHARED_WORKERS)
76 virtual SharedWorker* toSharedWorker(); 76 virtual SharedWorker* toSharedWorker();
77 #endif 77 #endif
78 #if ENABLE(WEB_SOCKETS)
79 virtual WebSocket* toWebSocket();
80 #endif
78 81
79 virtual ScriptExecutionContext* scriptExecutionContext() const = 0; 82 virtual ScriptExecutionContext* scriptExecutionContext() const = 0;
80 83
81 virtual void addEventListener(const AtomicString& eventType, PassRefPtr< EventListener>, bool useCapture) = 0; 84 virtual void addEventListener(const AtomicString& eventType, PassRefPtr< EventListener>, bool useCapture) = 0;
82 virtual void removeEventListener(const AtomicString& eventType, EventLis tener*, bool useCapture) = 0; 85 virtual void removeEventListener(const AtomicString& eventType, EventLis tener*, bool useCapture) = 0;
83 virtual bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&) = 0; 86 virtual bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&) = 0;
84 87
85 void ref() { refEventTarget(); } 88 void ref() { refEventTarget(); }
86 void deref() { derefEventTarget(); } 89 void deref() { derefEventTarget(); }
87 90
(...skipping 16 matching lines...) Expand all
104 #ifndef NDEBUG 107 #ifndef NDEBUG
105 bool eventDispatchForbidden(); 108 bool eventDispatchForbidden();
106 #else 109 #else
107 inline void forbidEventDispatch() { } 110 inline void forbidEventDispatch() { }
108 inline void allowEventDispatch() { } 111 inline void allowEventDispatch() { }
109 #endif 112 #endif
110 113
111 } 114 }
112 115
113 #endif 116 #endif
OLDNEW
« no previous file with comments | « WebCore/dom/EventNames.h ('k') | WebCore/dom/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698