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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 namespace blink { | 61 namespace blink { |
62 | 62 |
63 namespace { | 63 namespace { |
64 | 64 |
65 class EmptyDataHandle final : public WebDataConsumerHandle { | 65 class EmptyDataHandle final : public WebDataConsumerHandle { |
66 private: | 66 private: |
67 class EmptyDataReader final : public WebDataConsumerHandle::Reader { | 67 class EmptyDataReader final : public WebDataConsumerHandle::Reader { |
68 public: | 68 public: |
69 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) | 69 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) |
70 { | 70 { |
71 Platform::current()->currentThread()->getWebTaskRunner()->postTask(B
LINK_FROM_HERE, bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), client
)); | 71 Platform::current()->currentThread()->getWebTaskRunner()->postTask(B
LINK_FROM_HERE, bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), WTF::u
nretained(client))); |
72 } | 72 } |
73 private: | 73 private: |
74 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override | 74 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override |
75 { | 75 { |
76 *available = 0; | 76 *available = 0; |
77 *buffer = nullptr; | 77 *buffer = nullptr; |
78 return Done; | 78 return Done; |
79 } | 79 } |
80 Result endRead(size_t) override | 80 Result endRead(size_t) override |
81 { | 81 { |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 993 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
994 } | 994 } |
995 | 995 |
996 Document& DocumentThreadableLoader::document() const | 996 Document& DocumentThreadableLoader::document() const |
997 { | 997 { |
998 ASSERT(m_document); | 998 ASSERT(m_document); |
999 return *m_document; | 999 return *m_document; |
1000 } | 1000 } |
1001 | 1001 |
1002 } // namespace blink | 1002 } // namespace blink |
OLD | NEW |