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

Unified Diff: Source/web/WebSocketImpl.h

Issue 419973007: Decouple WebSocketChannelClient from WebSocketImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebSocketChannelClientProxy.h ('k') | Source/web/WebSocketImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebSocketImpl.h
diff --git a/Source/web/WebSocketImpl.h b/Source/web/WebSocketImpl.h
index 08481864a81311c5a7dec7f8e1f8bbd528a9ae18..13c5b96fca931856e711511599db400ebf9a196a 100644
--- a/Source/web/WebSocketImpl.h
+++ b/Source/web/WebSocketImpl.h
@@ -40,15 +40,14 @@
#include "wtf/OwnPtr.h"
#include "wtf/RefPtr.h"
-namespace blink { class WebSocketChannel; }
-
namespace blink {
class WebDocument;
+class WebSocketChannel;
+class WebSocketChannelClientProxy;
class WebURL;
-class WebSocketImpl FINAL : public NoBaseWillBeGarbageCollectedFinalized<WebSocketImpl>, public WebSocket, public blink::WebSocketChannelClient {
- WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebSocketImpl)
+class WebSocketImpl FINAL : public WebSocket {
public:
WebSocketImpl(const WebDocument&, WebSocketClient*);
virtual ~WebSocketImpl();
@@ -67,20 +66,19 @@ public:
virtual void fail(const WebString& reason) OVERRIDE;
virtual void disconnect() OVERRIDE;
- // WebSocketChannelClient
- virtual void didConnect(const String& subprotocol, const String& extensions) OVERRIDE;
- virtual void didReceiveMessage(const String& message) OVERRIDE;
- virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData) OVERRIDE;
- virtual void didReceiveMessageError() OVERRIDE;
- virtual void didConsumeBufferedAmount(unsigned long consumed) OVERRIDE;
- virtual void didStartClosingHandshake() OVERRIDE;
- virtual void didClose(ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) OVERRIDE;
-
- virtual void trace(blink::Visitor*) OVERRIDE;
+ // WebSocketChannelClient methods proxied by WebSocketChannelClientProxy.
+ void didConnect(const String& subprotocol, const String& extensions);
+ void didReceiveMessage(const String& message);
+ void didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData);
+ void didReceiveMessageError();
+ void didConsumeBufferedAmount(unsigned long consumed);
+ void didStartClosingHandshake();
+ void didClose(WebSocketChannelClient::ClosingHandshakeCompletionStatus, unsigned short code, const String& reason);
private:
- RefPtrWillBeMember<blink::WebSocketChannel> m_private;
+ RefPtrWillBePersistent<blink::WebSocketChannel> m_private;
WebSocketClient* m_client;
+ OwnPtrWillBePersistent<WebSocketChannelClientProxy> m_channelProxy;
BinaryType m_binaryType;
WebString m_subprotocol;
WebString m_extensions;
« no previous file with comments | « Source/web/WebSocketChannelClientProxy.h ('k') | Source/web/WebSocketImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698