| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 return initiatorObject; | 812 return initiatorObject; |
| 813 } | 813 } |
| 814 | 814 |
| 815 if (m_isRecalculatingStyle && m_styleRecalculationInitiator) | 815 if (m_isRecalculatingStyle && m_styleRecalculationInitiator) |
| 816 return m_styleRecalculationInitiator->clone(); | 816 return m_styleRecalculationInitiator->clone(); |
| 817 | 817 |
| 818 return protocol::Network::Initiator::create() | 818 return protocol::Network::Initiator::create() |
| 819 .setType(protocol::Network::Initiator::TypeEnum::Other).build(); | 819 .setType(protocol::Network::Initiator::TypeEnum::Other).build(); |
| 820 } | 820 } |
| 821 | 821 |
| 822 void InspectorNetworkAgent::didCreateWebSocket(Document* document, unsigned long
identifier, const KURL& requestURL, const String&) | 822 void InspectorNetworkAgent::didCreateWebSocket(Document*, unsigned long identifi
er, const KURL& requestURL, const String&) |
| 823 { | 823 { |
| 824 std::unique_ptr<protocol::Runtime::StackTrace> currentStackTrace = SourceLoc
ation::capture(document)->buildInspectorObject(); | 824 frontend()->webSocketCreated(IdentifiersFactory::requestId(identifier), urlW
ithoutFragment(requestURL).getString()); |
| 825 if (!currentStackTrace) { | |
| 826 frontend()->webSocketCreated(IdentifiersFactory::requestId(identifier),
urlWithoutFragment(requestURL).getString()); | |
| 827 return; | |
| 828 } | |
| 829 | |
| 830 std::unique_ptr<protocol::Network::Initiator> initiatorObject = protocol::Ne
twork::Initiator::create() | |
| 831 .setType(protocol::Network::Initiator::TypeEnum::Script).build(); | |
| 832 initiatorObject->setStack(std::move(currentStackTrace)); | |
| 833 frontend()->webSocketCreated(IdentifiersFactory::requestId(identifier), urlW
ithoutFragment(requestURL).getString(), std::move(initiatorObject)); | |
| 834 } | 825 } |
| 835 | 826 |
| 836 void InspectorNetworkAgent::willSendWebSocketHandshakeRequest(Document*, unsigne
d long identifier, const WebSocketHandshakeRequest* request) | 827 void InspectorNetworkAgent::willSendWebSocketHandshakeRequest(Document*, unsigne
d long identifier, const WebSocketHandshakeRequest* request) |
| 837 { | 828 { |
| 838 DCHECK(request); | 829 DCHECK(request); |
| 839 std::unique_ptr<protocol::Network::WebSocketRequest> requestObject = protoco
l::Network::WebSocketRequest::create() | 830 std::unique_ptr<protocol::Network::WebSocketRequest> requestObject = protoco
l::Network::WebSocketRequest::create() |
| 840 .setHeaders(buildObjectForHeaders(request->headerFields())).build(); | 831 .setHeaders(buildObjectForHeaders(request->headerFields())).build(); |
| 841 frontend()->webSocketWillSendHandshakeRequest(IdentifiersFactory::requestId(
identifier), monotonicallyIncreasingTime(), currentTime(), std::move(requestObje
ct)); | 832 frontend()->webSocketWillSendHandshakeRequest(IdentifiersFactory::requestId(
identifier), monotonicallyIncreasingTime(), currentTime(), std::move(requestObje
ct)); |
| 842 } | 833 } |
| 843 | 834 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 , m_removeFinishedReplayXHRTimer(this, &InspectorNetworkAgent::removeFinishe
dReplayXHRFired) | 1123 , m_removeFinishedReplayXHRTimer(this, &InspectorNetworkAgent::removeFinishe
dReplayXHRFired) |
| 1133 { | 1124 { |
| 1134 } | 1125 } |
| 1135 | 1126 |
| 1136 bool InspectorNetworkAgent::shouldForceCORSPreflight() | 1127 bool InspectorNetworkAgent::shouldForceCORSPreflight() |
| 1137 { | 1128 { |
| 1138 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); | 1129 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); |
| 1139 } | 1130 } |
| 1140 | 1131 |
| 1141 } // namespace blink | 1132 } // namespace blink |
| OLD | NEW |