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

Side by Side Diff: sky/engine/core/loader/FrameFetchContext.cpp

Issue 691663002: Unfork Sky's trace events (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi er, ResourceLoadPriority loadPriority, int intraPriorityValue) 63 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi er, ResourceLoadPriority loadPriority, int intraPriorityValue)
64 { 64 {
65 m_frame->loaderClient()->dispatchDidChangeResourcePriority(identifier, loadP riority, intraPriorityValue); 65 m_frame->loaderClient()->dispatchDidChangeResourcePriority(identifier, loadP riority, intraPriorityValue);
66 } 66 }
67 67
68 void FrameFetchContext::dispatchWillSendRequest(Document* document, unsigned lon g identifier, ResourceRequest& request, const ResourceResponse& redirectResponse , const FetchInitiatorInfo& initiatorInfo) 68 void FrameFetchContext::dispatchWillSendRequest(Document* document, unsigned lon g identifier, ResourceRequest& request, const ResourceResponse& redirectResponse , const FetchInitiatorInfo& initiatorInfo)
69 { 69 {
70 m_frame->loaderClient()->dispatchWillSendRequest(document, identifier, reque st, redirectResponse); 70 m_frame->loaderClient()->dispatchWillSendRequest(document, identifier, reque st, redirectResponse);
71 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceSendRequest", "data", InspectorSendRequestEvent::data(identifier, m_frame, req uest)); 71 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceSendRequest", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorSendRequestEvent::da ta(identifier, m_frame, request));
72 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", "stack", InspectorCallStackEvent::currentCallStack()); 72 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current CallStack());
73 } 73 }
74 74
75 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq uest& request, const ResourceResponse& response) 75 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq uest& request, const ResourceResponse& response)
76 { 76 {
77 m_frame->loaderClient()->dispatchDidLoadResourceFromMemoryCache(request, res ponse); 77 m_frame->loaderClient()->dispatchDidLoadResourceFromMemoryCache(request, res ponse);
78 } 78 }
79 79
80 void FrameFetchContext::dispatchDidReceiveResponse(Document* document, unsigned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader) 80 void FrameFetchContext::dispatchDidReceiveResponse(Document* document, unsigned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader)
81 { 81 {
82 m_frame->loaderClient()->dispatchDidReceiveResponse(document, identifier, r) ; 82 m_frame->loaderClient()->dispatchDidReceiveResponse(document, identifier, r) ;
83 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceiveResponse", "data", InspectorReceiveResponseEvent::data(identifier, m_fr ame, r)); 83 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceiveResponse", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorReceiveResponseE vent::data(identifier, m_frame, r));
84 m_frame->console().reportResourceResponseReceived(document, identifier, r); 84 m_frame->console().reportResourceResponseReceived(document, identifier, r);
85 } 85 }
86 86
87 void FrameFetchContext::dispatchDidReceiveData(Document*, unsigned long identifi er, const char* data, int dataLength, int encodedDataLength) 87 void FrameFetchContext::dispatchDidReceiveData(Document*, unsigned long identifi er, const char* data, int dataLength, int encodedDataLength)
88 { 88 {
89 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en codedDataLength)); 89 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorReceiveDataEvent::d ata(identifier, m_frame, encodedDataLength));
90 } 90 }
91 91
92 void FrameFetchContext::dispatchDidDownloadData(Document*, unsigned long identif ier, int dataLength, int encodedDataLength) 92 void FrameFetchContext::dispatchDidDownloadData(Document*, unsigned long identif ier, int dataLength, int encodedDataLength)
93 { 93 {
94 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en codedDataLength)); 94 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorReceiveDataEvent::d ata(identifier, m_frame, encodedDataLength));
95 } 95 }
96 96
97 void FrameFetchContext::dispatchDidFinishLoading(Document* document, unsigned lo ng identifier, double finishTime, int64_t encodedDataLength) 97 void FrameFetchContext::dispatchDidFinishLoading(Document* document, unsigned lo ng identifier, double finishTime, int64_t encodedDataLength)
98 { 98 {
99 m_frame->loaderClient()->dispatchDidFinishLoading(document, identifier); 99 m_frame->loaderClient()->dispatchDidFinishLoading(document, identifier);
100 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", "data", InspectorResourceFinishEvent::data(identifier, finishTime, fa lse)); 100 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorResourceFinishEvent::data (identifier, finishTime, false));
101 } 101 }
102 102
103 void FrameFetchContext::dispatchDidFail(Document* document, unsigned long identi fier, const ResourceError& error) 103 void FrameFetchContext::dispatchDidFail(Document* document, unsigned long identi fier, const ResourceError& error)
104 { 104 {
105 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", "data", InspectorResourceFinishEvent::data(identifier, 0, true)); 105 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorResourceFinishEvent::data (identifier, 0, true));
106 } 106 }
107 107
108 void FrameFetchContext::sendRemainingDelegateMessages(Document* document, unsign ed long identifier, const ResourceResponse& response, int dataLength) 108 void FrameFetchContext::sendRemainingDelegateMessages(Document* document, unsign ed long identifier, const ResourceResponse& response, int dataLength)
109 { 109 {
110 if (!response.isNull()) 110 if (!response.isNull())
111 dispatchDidReceiveResponse(document, identifier, response); 111 dispatchDidReceiveResponse(document, identifier, response);
112 112
113 if (dataLength > 0) 113 if (dataLength > 0)
114 dispatchDidReceiveData(document, identifier, 0, dataLength, 0); 114 dispatchDidReceiveData(document, identifier, 0, dataLength, 0);
115 115
116 dispatchDidFinishLoading(document, identifier, 0, 0); 116 dispatchDidFinishLoading(document, identifier, 0, 0);
117 } 117 }
118 118
119 } // namespace blink 119 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/HTMLDocumentParser.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698