| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 namespace blink { | 59 namespace blink { |
| 60 | 60 |
| 61 namespace { | 61 namespace { |
| 62 | 62 |
| 63 class EmptyDataHandle final : public WebDataConsumerHandle { | 63 class EmptyDataHandle final : public WebDataConsumerHandle { |
| 64 private: | 64 private: |
| 65 class EmptyDataReader final : public WebDataConsumerHandle::Reader { | 65 class EmptyDataReader final : public WebDataConsumerHandle::Reader { |
| 66 public: | 66 public: |
| 67 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) | 67 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) |
| 68 { | 68 { |
| 69 Platform::current()->currentThread()->getWebTaskRunner()->postTask(B
LINK_FROM_HERE, bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), client
)); | 69 Platform::current()->currentThread()->getWebTaskRunner()->postTask(B
LINK_FROM_HERE, bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), unreta
ined(client))); |
| 70 } | 70 } |
| 71 private: | 71 private: |
| 72 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override | 72 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override |
| 73 { | 73 { |
| 74 *available = 0; | 74 *available = 0; |
| 75 *buffer = nullptr; | 75 *buffer = nullptr; |
| 76 return Done; | 76 return Done; |
| 77 } | 77 } |
| 78 Result endRead(size_t) override | 78 Result endRead(size_t) override |
| 79 { | 79 { |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 936 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 937 } | 937 } |
| 938 | 938 |
| 939 Document& DocumentThreadableLoader::document() const | 939 Document& DocumentThreadableLoader::document() const |
| 940 { | 940 { |
| 941 ASSERT(m_document); | 941 ASSERT(m_document); |
| 942 return *m_document; | 942 return *m_document; |
| 943 } | 943 } |
| 944 | 944 |
| 945 } // namespace blink | 945 } // namespace blink |
| OLD | NEW |