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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 ResourceLoadNotifier::ResourceLoadNotifier(Frame* frame) | 44 ResourceLoadNotifier::ResourceLoadNotifier(Frame* frame) |
45 : m_frame(frame) | 45 : m_frame(frame) |
46 { | 46 { |
47 } | 47 } |
48 | 48 |
49 void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig
ned long identifier, ResourceRequest& request, const ResourceResponse& redirectR
esponse, const CachedResourceInitiatorInfo& initiatorInfo) | 49 void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig
ned long identifier, ResourceRequest& request, const ResourceResponse& redirectR
esponse, const CachedResourceInitiatorInfo& initiatorInfo) |
50 { | 50 { |
51 m_frame->loader()->applyUserAgent(request); | 51 m_frame->loader()->applyUserAgent(request); |
52 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req
uest, redirectResponse); | 52 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req
uest, redirectResponse); |
53 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque
st, redirectResponse, initiatorInfo); | 53 InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, reque
st, redirectResponse, initiatorInfo); |
54 request.setReportLoadTiming(true); | |
55 } | 54 } |
56 | 55 |
57 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade
r) | 56 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& r, ResourceLoader* resourceLoade
r) |
58 { | 57 { |
59 if (Page* page = m_frame->page()) | 58 if (Page* page = m_frame->page()) |
60 page->progress()->incrementProgress(identifier, r); | 59 page->progress()->incrementProgress(identifier, r); |
61 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceResponse(m_frame, identifier, r); | 60 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceResponse(m_frame, identifier, r); |
62 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier,
r); | 61 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier,
r); |
63 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa
der, r, resourceLoader); | 62 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa
der, r, resourceLoader); |
64 } | 63 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if (dataLength > 0) | 97 if (dataLength > 0) |
99 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData
Length); | 98 dispatchDidReceiveData(loader, identifier, data, dataLength, encodedData
Length); |
100 | 99 |
101 if (error.isNull()) | 100 if (error.isNull()) |
102 dispatchDidFinishLoading(loader, identifier, 0); | 101 dispatchDidFinishLoading(loader, identifier, 0); |
103 else | 102 else |
104 dispatchDidFail(loader, identifier, error); | 103 dispatchDidFail(loader, identifier, error); |
105 } | 104 } |
106 | 105 |
107 } // namespace WebCore | 106 } // namespace WebCore |
OLD | NEW |