Chromium Code Reviews| Index: Source/core/fetch/ScriptResource.cpp |
| diff --git a/Source/core/fetch/ScriptResource.cpp b/Source/core/fetch/ScriptResource.cpp |
| index 1d12949a3a943235fc14677ff994fe539dc4de81..83a0a7a1eb9a109b1b09ebb2cdef11b8df22ccc6 100644 |
| --- a/Source/core/fetch/ScriptResource.cpp |
| +++ b/Source/core/fetch/ScriptResource.cpp |
| @@ -27,6 +27,7 @@ |
| #include "config.h" |
| #include "core/fetch/ScriptResource.h" |
| +#include "core/fetch/ResourceClientWalker.h" |
| #include "platform/MIMETypeRegistry.h" |
| #include "platform/SharedBuffer.h" |
| #include "platform/network/HTTPParsers.h" |
| @@ -48,6 +49,21 @@ ScriptResource::~ScriptResource() |
| { |
| } |
| +void ScriptResource::didAddClient(ResourceClient* c) |
|
haraken
2014/08/17 16:05:28
Nit: c => client
marja
2014/08/20 11:45:56
Done.
|
| +{ |
| + ASSERT(c->resourceClientType() == ScriptResourceClient::expectedType()); |
| + Resource::didAddClient(c); |
| +} |
| + |
| +void ScriptResource::appendData(const char* data, int length) |
| +{ |
| + Resource::appendData(data, length); |
| + ResourceClientWalker<ScriptResourceClient> w(m_clients); |
|
haraken
2014/08/17 16:05:28
Nit: w => walker
marja
2014/08/20 11:45:56
Done.
|
| + while (ScriptResourceClient* c = w.next()) { |
|
haraken
2014/08/17 16:05:28
Nit: c => client
marja
2014/08/20 11:45:56
Done.
|
| + c->notifyAppendData(this); |
| + } |
| +} |
| + |
| AtomicString ScriptResource::mimeType() const |
| { |
| return extractMIMETypeFromMediaType(m_response.httpHeaderField("Content-Type")).lower(); |