| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "wtf/Noncopyable.h" | 38 #include "wtf/Noncopyable.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class BlobDataHandle; | 42 class BlobDataHandle; |
| 43 class DOMArrayBuffer; | 43 class DOMArrayBuffer; |
| 44 class ExecutionContext; | 44 class ExecutionContext; |
| 45 class KURL; | 45 class KURL; |
| 46 class WebSocketChannelClient; | 46 class WebSocketChannelClient; |
| 47 | 47 |
| 48 // FIXME: WebSocketChannel needs to be RefCountedGarbageCollected to support man
ual ref/deref | 48 class MODULES_EXPORT WebSocketChannel : public GarbageCollectedFinalized<WebSock
etChannel> { |
| 49 // in MainThreadWebSocketChannelImpl. We should change it to GarbageCollectedFin
alized once | |
| 50 // we remove MainThreadWebSocketChannelImpl. | |
| 51 class MODULES_EXPORT WebSocketChannel : public RefCountedGarbageCollected<WebSoc
ketChannel> { | |
| 52 WTF_MAKE_NONCOPYABLE(WebSocketChannel); | 49 WTF_MAKE_NONCOPYABLE(WebSocketChannel); |
| 53 public: | 50 public: |
| 54 WebSocketChannel() { } | 51 WebSocketChannel() { } |
| 55 static WebSocketChannel* create(ExecutionContext*, WebSocketChannelClient*); | 52 static WebSocketChannel* create(ExecutionContext*, WebSocketChannelClient*); |
| 56 | 53 |
| 57 enum CloseEventCode { | 54 enum CloseEventCode { |
| 58 CloseEventCodeNotSpecified = -1, | 55 CloseEventCodeNotSpecified = -1, |
| 59 CloseEventCodeNormalClosure = 1000, | 56 CloseEventCodeNormalClosure = 1000, |
| 60 CloseEventCodeGoingAway = 1001, | 57 CloseEventCodeGoingAway = 1001, |
| 61 CloseEventCodeProtocolError = 1002, | 58 CloseEventCodeProtocolError = 1002, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 virtual void disconnect() = 0; // Will suppress didClose(). | 99 virtual void disconnect() = 0; // Will suppress didClose(). |
| 103 | 100 |
| 104 virtual ~WebSocketChannel() { } | 101 virtual ~WebSocketChannel() { } |
| 105 | 102 |
| 106 DEFINE_INLINE_VIRTUAL_TRACE() { } | 103 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 107 }; | 104 }; |
| 108 | 105 |
| 109 } // namespace blink | 106 } // namespace blink |
| 110 | 107 |
| 111 #endif // WebSocketChannel_h | 108 #endif // WebSocketChannel_h |
| OLD | NEW |