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

Side by Side Diff: Source/core/loader/ThreadableLoaderClientWrapper.h

Issue 603903003: [Streams] Pass WebDataConsumerHandle when the response arrives. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@web-data-pipe
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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 { 56 {
57 return m_done; 57 return m_done;
58 } 58 }
59 59
60 void didSendData(unsigned long long bytesSent, unsigned long long totalBytes ToBeSent) 60 void didSendData(unsigned long long bytesSent, unsigned long long totalBytes ToBeSent)
61 { 61 {
62 if (m_client) 62 if (m_client)
63 m_client->didSendData(bytesSent, totalBytesToBeSent); 63 m_client->didSendData(bytesSent, totalBytesToBeSent);
64 } 64 }
65 65
66 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re sponse) 66 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re sponse, PassOwnPtr<WebDataConsumerHandle> handle)
67 { 67 {
68 if (m_client) 68 if (m_client)
69 m_client->didReceiveResponse(identifier, response); 69 m_client->didReceiveResponse(identifier, response, handle);
70 } 70 }
71 71
72 void didReceiveData(const char* data, unsigned dataLength) 72 void didReceiveData(const char* data, unsigned dataLength)
73 { 73 {
74 if (m_client) 74 if (m_client)
75 m_client->didReceiveData(data, dataLength); 75 m_client->didReceiveData(data, dataLength);
76 } 76 }
77 77
78 void didReceiveCachedMetadata(const char* data, int dataLength) 78 void didReceiveCachedMetadata(const char* data, int dataLength)
79 { 79 {
(...skipping 28 matching lines...) Expand all
108 void didFailRedirectCheck() 108 void didFailRedirectCheck()
109 { 109 {
110 if (m_client) 110 if (m_client)
111 m_client->didFailRedirectCheck(); 111 m_client->didFailRedirectCheck();
112 m_done = true; 112 m_done = true;
113 } 113 }
114 114
115 void didReceiveAuthenticationCancellation(unsigned long identifier, const Re sourceResponse& response) 115 void didReceiveAuthenticationCancellation(unsigned long identifier, const Re sourceResponse& response)
116 { 116 {
117 if (m_client) 117 if (m_client)
118 m_client->didReceiveResponse(identifier, response); 118 m_client->didReceiveResponse(identifier, response, nullptr);
119 } 119 }
120 120
121 void didDownloadData(int dataLength) 121 void didDownloadData(int dataLength)
122 { 122 {
123 if (m_client) 123 if (m_client)
124 m_client->didDownloadData(dataLength); 124 m_client->didDownloadData(dataLength);
125 } 125 }
126 126
127 protected: 127 protected:
128 explicit ThreadableLoaderClientWrapper(ThreadableLoaderClient* client) 128 explicit ThreadableLoaderClientWrapper(ThreadableLoaderClient* client)
129 : m_client(client) 129 : m_client(client)
130 , m_done(false) 130 , m_done(false)
131 { 131 {
132 } 132 }
133 133
134 ThreadableLoaderClient* m_client; 134 ThreadableLoaderClient* m_client;
135 bool m_done; 135 bool m_done;
136 }; 136 };
137 137
138 } // namespace blink 138 } // namespace blink
139 139
140 #endif // ThreadableLoaderClientWrapper_h 140 #endif // ThreadableLoaderClientWrapper_h
OLDNEW
« no previous file with comments | « Source/core/loader/ThreadableLoaderClient.h ('k') | Source/core/loader/WorkerLoaderClientBridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698