OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url()); | 99 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url()); |
100 | 100 |
101 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req uest, redirectResponse); | 101 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req uest, redirectResponse); |
102 | 102 |
103 // If the URL changed, then we want to put that new URL in the "did tell cli ent" set too. | 103 // If the URL changed, then we want to put that new URL in the "did tell cli ent" set too. |
104 if (!request.isNull() && oldRequestURL != request.url().string()) | 104 if (!request.isNull() && oldRequestURL != request.url().string()) |
105 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url( )); | 105 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url( )); |
106 | 106 |
107 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque st, redirectResponse); | 107 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque st, redirectResponse); |
108 | 108 |
109 // Report WebTiming for all frames. | 109 // Report WebTiming for all frames. |
James Simonsen
2013/05/20 23:31:37
frames -> requests
Pan
2013/06/03 10:17:34
yep, done
| |
110 if (loader && !request.isNull() && request.url() == loader->requestURL()) | |
111 request.setReportLoadTiming(true); | |
112 | |
113 request.setReportLoadTiming(true); | 110 request.setReportLoadTiming(true); |
114 } | 111 } |
115 | 112 |
116 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade r) | 113 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade r) |
117 { | 114 { |
118 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv eResourceResponse(m_frame, identifier, r); | 115 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv eResourceResponse(m_frame, identifier, r); |
119 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier, r); | 116 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier, r); |
120 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa der, r, resourceLoader); | 117 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa der, r, resourceLoader); |
121 } | 118 } |
122 | 119 |
(...skipping 17 matching lines...) Expand all Loading... | |
140 if (dataLength > 0) | 137 if (dataLength > 0) |
141 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData Length); | 138 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData Length); |
142 | 139 |
143 if (error.isNull()) | 140 if (error.isNull()) |
144 dispatchDidFinishLoading(loader, identifier, 0); | 141 dispatchDidFinishLoading(loader, identifier, 0); |
145 else | 142 else |
146 m_frame->loader()->client()->dispatchDidFailLoading(loader, identifier, error); | 143 m_frame->loader()->client()->dispatchDidFailLoading(loader, identifier, error); |
147 } | 144 } |
148 | 145 |
149 } // namespace WebCore | 146 } // namespace WebCore |
OLD | NEW |