| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "platform/exported/WrappedResourceRequest.h" | 36 #include "platform/exported/WrappedResourceRequest.h" |
| 37 #include "platform/exported/WrappedResourceResponse.h" | 37 #include "platform/exported/WrappedResourceResponse.h" |
| 38 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
| 39 #include "platform/weborigin/KURL.h" | 39 #include "platform/weborigin/KURL.h" |
| 40 #include "public/web/WebDataSource.h" | 40 #include "public/web/WebDataSource.h" |
| 41 #include "wtf/Vector.h" | 41 #include "wtf/Vector.h" |
| 42 #include <memory> | 42 #include <memory> |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class Document; |
| 47 |
| 46 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { | 48 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { |
| 47 public: | 49 public: |
| 48 static WebDataSourceImpl* create(LocalFrame*, | 50 static WebDataSourceImpl* create(LocalFrame*, |
| 49 const ResourceRequest&, | 51 const ResourceRequest&, |
| 50 const SubstituteData&, | 52 const SubstituteData&, |
| 51 ClientRedirectPolicy); | 53 ClientRedirectPolicy, |
| 54 Document* originDocument); |
| 52 | 55 |
| 53 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) { | 56 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) { |
| 54 return static_cast<WebDataSourceImpl*>(loader); | 57 return static_cast<WebDataSourceImpl*>(loader); |
| 55 } | 58 } |
| 56 | 59 |
| 57 // WebDataSource methods: | 60 // WebDataSource methods: |
| 58 const WebURLRequest& originalRequest() const override; | 61 const WebURLRequest& originalRequest() const override; |
| 59 const WebURLRequest& getRequest() const override; | 62 const WebURLRequest& getRequest() const override; |
| 60 const WebURLResponse& response() const override; | 63 const WebURLResponse& response() const override; |
| 61 bool hasUnreachableURL() const override; | 64 bool hasUnreachableURL() const override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 80 void resetSourceLocation() override; | 83 void resetSourceLocation() override; |
| 81 | 84 |
| 82 static WebNavigationType toWebNavigationType(NavigationType); | 85 static WebNavigationType toWebNavigationType(NavigationType); |
| 83 | 86 |
| 84 DECLARE_VIRTUAL_TRACE(); | 87 DECLARE_VIRTUAL_TRACE(); |
| 85 | 88 |
| 86 private: | 89 private: |
| 87 WebDataSourceImpl(LocalFrame*, | 90 WebDataSourceImpl(LocalFrame*, |
| 88 const ResourceRequest&, | 91 const ResourceRequest&, |
| 89 const SubstituteData&, | 92 const SubstituteData&, |
| 90 ClientRedirectPolicy); | 93 ClientRedirectPolicy, |
| 94 Document* originDocument); |
| 91 ~WebDataSourceImpl() override; | 95 ~WebDataSourceImpl() override; |
| 92 void detachFromFrame() override; | 96 void detachFromFrame() override; |
| 93 String debugName() const override { return "WebDataSourceImpl"; } | 97 String debugName() const override { return "WebDataSourceImpl"; } |
| 94 | 98 |
| 95 // Mutable because the const getters will magically sync these to the | 99 // Mutable because the const getters will magically sync these to the |
| 96 // latest version from WebKit. | 100 // latest version from WebKit. |
| 97 mutable WrappedResourceRequest m_originalRequestWrapper; | 101 mutable WrappedResourceRequest m_originalRequestWrapper; |
| 98 mutable WrappedResourceRequest m_requestWrapper; | 102 mutable WrappedResourceRequest m_requestWrapper; |
| 99 mutable WrappedResourceResponse m_responseWrapper; | 103 mutable WrappedResourceResponse m_responseWrapper; |
| 100 | 104 |
| 101 std::unique_ptr<ExtraData> m_extraData; | 105 std::unique_ptr<ExtraData> m_extraData; |
| 102 }; | 106 }; |
| 103 | 107 |
| 104 } // namespace blink | 108 } // namespace blink |
| 105 | 109 |
| 106 #endif // WebDataSourceImpl_h | 110 #endif // WebDataSourceImpl_h |
| OLD | NEW |