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

Side by Side Diff: Source/modules/websockets/DocumentWebSocketChannel.cpp

Issue 954933003: Sync the WebSocket interface with the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add TypeChecking=Interface Created 5 years, 9 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/modules/websockets/DOMWebSocket.cpp ('k') | Source/modules/websockets/WebSocket.idl » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 InspectorInstrumentation::didCloseWebSocket(document(), m_identifier); 261 InspectorInstrumentation::didCloseWebSocket(document(), m_identifier);
262 } 262 }
263 abortAsyncOperations(); 263 abortAsyncOperations();
264 m_handle.clear(); 264 m_handle.clear();
265 m_client = nullptr; 265 m_client = nullptr;
266 m_identifier = 0; 266 m_identifier = 0;
267 } 267 }
268 268
269 DocumentWebSocketChannel::Message::Message(const String& text) 269 DocumentWebSocketChannel::Message::Message(const String& text)
270 : type(MessageTypeText) 270 : type(MessageTypeText)
271 , text(text.utf8(StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD)) { } 271 , text(text.utf8()) { }
272 272
273 DocumentWebSocketChannel::Message::Message(PassRefPtr<BlobDataHandle> blobDataHa ndle) 273 DocumentWebSocketChannel::Message::Message(PassRefPtr<BlobDataHandle> blobDataHa ndle)
274 : type(MessageTypeBlob) 274 : type(MessageTypeBlob)
275 , blobDataHandle(blobDataHandle) { } 275 , blobDataHandle(blobDataHandle) { }
276 276
277 DocumentWebSocketChannel::Message::Message(PassRefPtr<DOMArrayBuffer> arrayBuffe r) 277 DocumentWebSocketChannel::Message::Message(PassRefPtr<DOMArrayBuffer> arrayBuffe r)
278 : type(MessageTypeArrayBuffer) 278 : type(MessageTypeArrayBuffer)
279 , arrayBuffer(arrayBuffer) { } 279 , arrayBuffer(arrayBuffer) { }
280 280
281 DocumentWebSocketChannel::Message::Message(PassOwnPtr<Vector<char>> vectorData) 281 DocumentWebSocketChannel::Message::Message(PassOwnPtr<Vector<char>> vectorData)
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 584
585 DEFINE_TRACE(DocumentWebSocketChannel) 585 DEFINE_TRACE(DocumentWebSocketChannel)
586 { 586 {
587 visitor->trace(m_blobLoader); 587 visitor->trace(m_blobLoader);
588 visitor->trace(m_client); 588 visitor->trace(m_client);
589 WebSocketChannel::trace(visitor); 589 WebSocketChannel::trace(visitor);
590 ContextLifecycleObserver::trace(visitor); 590 ContextLifecycleObserver::trace(visitor);
591 } 591 }
592 592
593 } // namespace blink 593 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/websockets/DOMWebSocket.cpp ('k') | Source/modules/websockets/WebSocket.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698