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

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

Issue 1244703002: Remove 'blink::WebSerializedOrigin' (3/4) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: yay Created 5 years, 5 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 | « Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp ('k') | no next file » | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/loader/FrameLoader.h" 43 #include "core/loader/FrameLoader.h"
44 #include "core/loader/FrameLoaderClient.h" 44 #include "core/loader/FrameLoaderClient.h"
45 #include "core/loader/MixedContentChecker.h" 45 #include "core/loader/MixedContentChecker.h"
46 #include "modules/websockets/InspectorWebSocketEvents.h" 46 #include "modules/websockets/InspectorWebSocketEvents.h"
47 #include "modules/websockets/WebSocketChannelClient.h" 47 #include "modules/websockets/WebSocketChannelClient.h"
48 #include "modules/websockets/WebSocketFrame.h" 48 #include "modules/websockets/WebSocketFrame.h"
49 #include "platform/Logging.h" 49 #include "platform/Logging.h"
50 #include "platform/network/WebSocketHandshakeRequest.h" 50 #include "platform/network/WebSocketHandshakeRequest.h"
51 #include "platform/weborigin/SecurityOrigin.h" 51 #include "platform/weborigin/SecurityOrigin.h"
52 #include "public/platform/Platform.h" 52 #include "public/platform/Platform.h"
53 #include "public/platform/WebSecurityOrigin.h"
53 #include "public/platform/WebSocketHandshakeRequestInfo.h" 54 #include "public/platform/WebSocketHandshakeRequestInfo.h"
54 #include "public/platform/WebSocketHandshakeResponseInfo.h" 55 #include "public/platform/WebSocketHandshakeResponseInfo.h"
55 #include "public/platform/WebString.h" 56 #include "public/platform/WebString.h"
56 #include "public/platform/WebURL.h" 57 #include "public/platform/WebURL.h"
57 #include "public/platform/WebVector.h" 58 #include "public/platform/WebVector.h"
58 59
59 using blink::WebSocketHandle; 60 using blink::WebSocketHandle;
60 61
61 namespace blink { 62 namespace blink {
62 63
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // it. 154 // it.
154 protocol.split(", ", true, protocols); 155 protocol.split(", ", true, protocols);
155 } 156 }
156 WebVector<WebString> webProtocols(protocols.size()); 157 WebVector<WebString> webProtocols(protocols.size());
157 for (size_t i = 0; i < protocols.size(); ++i) { 158 for (size_t i = 0; i < protocols.size(); ++i) {
158 webProtocols[i] = protocols[i]; 159 webProtocols[i] = protocols[i];
159 } 160 }
160 161
161 if (executionContext()->isDocument() && document()->frame()) 162 if (executionContext()->isDocument() && document()->frame())
162 document()->frame()->loader().client()->dispatchWillOpenWebSocket(m_hand le.get()); 163 document()->frame()->loader().client()->dispatchWillOpenWebSocket(m_hand le.get());
163 m_handle->connect(url, webProtocols, *executionContext()->securityOrigin(), this); 164 m_handle->connect(url, webProtocols, WebSecurityOrigin(executionContext()->s ecurityOrigin()), this);
164 165
165 flowControlIfNecessary(); 166 flowControlIfNecessary();
166 if (m_identifier) { 167 if (m_identifier) {
167 TRACE_EVENT_INSTANT1("devtools.timeline", "WebSocketCreate", TRACE_EVENT _SCOPE_THREAD, "data", InspectorWebSocketCreateEvent::data(document(), m_identif ier, url, protocol)); 168 TRACE_EVENT_INSTANT1("devtools.timeline", "WebSocketCreate", TRACE_EVENT _SCOPE_THREAD, "data", InspectorWebSocketCreateEvent::data(document(), m_identif ier, url, protocol));
168 InspectorInstrumentation::didCreateWebSocket(document(), m_identifier, u rl, protocol); 169 InspectorInstrumentation::didCreateWebSocket(document(), m_identifier, u rl, protocol);
169 } 170 }
170 return true; 171 return true;
171 } 172 }
172 173
173 void DocumentWebSocketChannel::send(const CString& message) 174 void DocumentWebSocketChannel::send(const CString& message)
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 576
576 DEFINE_TRACE(DocumentWebSocketChannel) 577 DEFINE_TRACE(DocumentWebSocketChannel)
577 { 578 {
578 visitor->trace(m_blobLoader); 579 visitor->trace(m_blobLoader);
579 visitor->trace(m_client); 580 visitor->trace(m_client);
580 WebSocketChannel::trace(visitor); 581 WebSocketChannel::trace(visitor);
581 ContextLifecycleObserver::trace(visitor); 582 ContextLifecycleObserver::trace(visitor);
582 } 583 }
583 584
584 } // namespace blink 585 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698