| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 namespace blink { | 62 namespace blink { |
| 63 | 63 |
| 64 namespace { | 64 namespace { |
| 65 | 65 |
| 66 class EmptyDataHandle final : public WebDataConsumerHandle { | 66 class EmptyDataHandle final : public WebDataConsumerHandle { |
| 67 private: | 67 private: |
| 68 class EmptyDataReader final : public WebDataConsumerHandle::Reader { | 68 class EmptyDataReader final : public WebDataConsumerHandle::Reader { |
| 69 public: | 69 public: |
| 70 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) | 70 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) |
| 71 { | 71 { |
| 72 Platform::current()->currentThread()->getWebTaskRunner()->postTask(B
LINK_FROM_HERE, WTF::bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), W
TF::unretained(client))); | 72 client->getTaskRunner()->postTask(BLINK_FROM_HERE, WTF::bind(&EmptyD
ataReader::notify, m_factory.createWeakPtr(), WTF::unretained(client))); |
| 73 } | 73 } |
| 74 private: | 74 private: |
| 75 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override | 75 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override |
| 76 { | 76 { |
| 77 *available = 0; | 77 *available = 0; |
| 78 *buffer = nullptr; | 78 *buffer = nullptr; |
| 79 return Done; | 79 return Done; |
| 80 } | 80 } |
| 81 Result endRead(size_t) override | 81 Result endRead(size_t) override |
| 82 { | 82 { |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 1015 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 Document& DocumentThreadableLoader::document() const | 1018 Document& DocumentThreadableLoader::document() const |
| 1019 { | 1019 { |
| 1020 ASSERT(m_document); | 1020 ASSERT(m_document); |
| 1021 return *m_document; | 1021 return *m_document; |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 } // namespace blink | 1024 } // namespace blink |
| OLD | NEW |