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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "core/inspector/InspectorInstrumentation.h" | 43 #include "core/inspector/InspectorInstrumentation.h" |
44 #include "core/inspector/InspectorTraceEvents.h" | 44 #include "core/inspector/InspectorTraceEvents.h" |
45 #include "core/loader/CrossOriginPreflightResultCache.h" | 45 #include "core/loader/CrossOriginPreflightResultCache.h" |
46 #include "core/loader/DocumentThreadableLoaderClient.h" | 46 #include "core/loader/DocumentThreadableLoaderClient.h" |
47 #include "core/loader/FrameLoader.h" | 47 #include "core/loader/FrameLoader.h" |
48 #include "core/loader/FrameLoaderClient.h" | 48 #include "core/loader/FrameLoaderClient.h" |
49 #include "core/loader/ThreadableLoaderClient.h" | 49 #include "core/loader/ThreadableLoaderClient.h" |
50 #include "core/page/ChromeClient.h" | 50 #include "core/page/ChromeClient.h" |
51 #include "core/page/Page.h" | 51 #include "core/page/Page.h" |
52 #include "platform/SharedBuffer.h" | 52 #include "platform/SharedBuffer.h" |
53 #include "platform/Task.h" | |
54 #include "platform/network/ResourceRequest.h" | 53 #include "platform/network/ResourceRequest.h" |
55 #include "platform/weborigin/SchemeRegistry.h" | 54 #include "platform/weborigin/SchemeRegistry.h" |
56 #include "platform/weborigin/SecurityOrigin.h" | 55 #include "platform/weborigin/SecurityOrigin.h" |
57 #include "public/platform/Platform.h" | 56 #include "public/platform/Platform.h" |
58 #include "public/platform/WebURLRequest.h" | 57 #include "public/platform/WebURLRequest.h" |
59 #include "wtf/Assertions.h" | 58 #include "wtf/Assertions.h" |
60 | 59 |
61 namespace blink { | 60 namespace blink { |
62 | 61 |
63 namespace { | 62 namespace { |
64 | 63 |
65 class EmptyDataHandle final : public WebDataConsumerHandle { | 64 class EmptyDataHandle final : public WebDataConsumerHandle { |
66 private: | 65 private: |
67 class EmptyDataReader final : public WebDataConsumerHandle::Reader { | 66 class EmptyDataReader final : public WebDataConsumerHandle::Reader { |
68 public: | 67 public: |
69 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) | 68 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact
ory(this) |
70 { | 69 { |
71 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_F
ROM_HERE, new Task(bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), cli
ent))); | 70 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_F
ROM_HERE, bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), client)); |
72 } | 71 } |
73 private: | 72 private: |
74 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override | 73 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size
_t *available) override |
75 { | 74 { |
76 *available = 0; | 75 *available = 0; |
77 *buffer = nullptr; | 76 *buffer = nullptr; |
78 return Done; | 77 return Done; |
79 } | 78 } |
80 Result endRead(size_t) override | 79 Result endRead(size_t) override |
81 { | 80 { |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 return m_securityOrigin ? m_securityOrigin.get() : document().securityOrigin
(); | 916 return m_securityOrigin ? m_securityOrigin.get() : document().securityOrigin
(); |
918 } | 917 } |
919 | 918 |
920 Document& DocumentThreadableLoader::document() const | 919 Document& DocumentThreadableLoader::document() const |
921 { | 920 { |
922 ASSERT(m_document); | 921 ASSERT(m_document); |
923 return *m_document; | 922 return *m_document; |
924 } | 923 } |
925 | 924 |
926 } // namespace blink | 925 } // namespace blink |
OLD | NEW |