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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url().st
ring()); | 55 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url().st
ring()); |
56 | 56 |
57 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req
uest, redirectResponse); | 57 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req
uest, redirectResponse); |
58 | 58 |
59 // If the URL changed, then we want to put that new URL in the "did tell cli
ent" set too. | 59 // If the URL changed, then we want to put that new URL in the "did tell cli
ent" set too. |
60 if (!request.isNull() && oldRequestURL != request.url().string()) | 60 if (!request.isNull() && oldRequestURL != request.url().string()) |
61 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url(
).string()); | 61 m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url(
).string()); |
62 | 62 |
63 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque
st, redirectResponse); | 63 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque
st, redirectResponse); |
64 | 64 |
65 // Report WebTiming for all frames. | 65 // Report WebTiming for all requests. |
66 if (loader && !request.isNull() && request.url() == loader->requestURL()) | |
67 request.setReportLoadTiming(true); | |
68 | |
69 request.setReportLoadTiming(true); | 66 request.setReportLoadTiming(true); |
70 } | 67 } |
71 | 68 |
72 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade
r) | 69 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade
r) |
73 { | 70 { |
74 if (Page* page = m_frame->page()) | 71 if (Page* page = m_frame->page()) |
75 page->progress()->incrementProgress(identifier, r); | 72 page->progress()->incrementProgress(identifier, r); |
76 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceResponse(m_frame, identifier, r); | 73 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceResponse(m_frame, identifier, r); |
77 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier,
r); | 74 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier,
r); |
78 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa
der, r, resourceLoader); | 75 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa
der, r, resourceLoader); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 if (dataLength > 0) | 110 if (dataLength > 0) |
114 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData
Length); | 111 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData
Length); |
115 | 112 |
116 if (error.isNull()) | 113 if (error.isNull()) |
117 dispatchDidFinishLoading(loader, identifier, 0); | 114 dispatchDidFinishLoading(loader, identifier, 0); |
118 else | 115 else |
119 dispatchDidFail(loader, identifier, error); | 116 dispatchDidFail(loader, identifier, error); |
120 } | 117 } |
121 | 118 |
122 } // namespace WebCore | 119 } // namespace WebCore |
OLD | NEW |