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

Side by Side Diff: Source/web/WebSocketImpl.cpp

Issue 270573008: Oilpan: Prepare to support garbage-collected Node in WebNode hierarchy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add FIXME comments Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebSelectElement.cpp ('k') | Source/web/WebTextAreaElement.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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "wtf/ArrayBuffer.h" 44 #include "wtf/ArrayBuffer.h"
45 45
46 using namespace WebCore; 46 using namespace WebCore;
47 47
48 namespace blink { 48 namespace blink {
49 49
50 WebSocketImpl::WebSocketImpl(const WebDocument& document, WebSocketClient* clien t) 50 WebSocketImpl::WebSocketImpl(const WebDocument& document, WebSocketClient* clien t)
51 : m_client(client) 51 : m_client(client)
52 , m_binaryType(BinaryTypeBlob) 52 , m_binaryType(BinaryTypeBlob)
53 { 53 {
54 RefPtr<Document> coreDocument = PassRefPtr<Document>(document); 54 RefPtrWillBeRawPtr<Document> coreDocument = PassRefPtrWillBeRawPtr<Document> (document);
55 if (RuntimeEnabledFeatures::experimentalWebSocketEnabled()) { 55 if (RuntimeEnabledFeatures::experimentalWebSocketEnabled()) {
56 m_private = NewWebSocketChannelImpl::create(coreDocument.get(), this); 56 m_private = NewWebSocketChannelImpl::create(coreDocument.get(), this);
57 } else { 57 } else {
58 m_private = MainThreadWebSocketChannel::create(coreDocument.get(), this) ; 58 m_private = MainThreadWebSocketChannel::create(coreDocument.get(), this) ;
59 } 59 }
60 } 60 }
61 61
62 WebSocketImpl::~WebSocketImpl() 62 WebSocketImpl::~WebSocketImpl()
63 { 63 {
64 m_private->disconnect(); 64 m_private->disconnect();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 { 159 {
160 m_client->didStartClosingHandshake(); 160 m_client->didStartClosingHandshake();
161 } 161 }
162 162
163 void WebSocketImpl::didClose(unsigned long bufferedAmount, ClosingHandshakeCompl etionStatus status, unsigned short code, const String& reason) 163 void WebSocketImpl::didClose(unsigned long bufferedAmount, ClosingHandshakeCompl etionStatus status, unsigned short code, const String& reason)
164 { 164 {
165 m_client->didClose(bufferedAmount, static_cast<WebSocketClient::ClosingHands hakeCompletionStatus>(status), code, WebString(reason)); 165 m_client->didClose(bufferedAmount, static_cast<WebSocketClient::ClosingHands hakeCompletionStatus>(status), code, WebString(reason));
166 } 166 }
167 167
168 } // namespace blink 168 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebSelectElement.cpp ('k') | Source/web/WebTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698