| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef WebDataSourceImpl_h | 31 #ifndef WebDataSourceImpl_h |
| 32 #define WebDataSourceImpl_h | 32 #define WebDataSourceImpl_h |
| 33 | 33 |
| 34 #include "core/loader/DocumentLoader.h" | 34 #include "core/loader/DocumentLoader.h" |
| 35 #include "platform/exported/WrappedResourceRequest.h" | 35 #include "platform/exported/WrappedResourceRequest.h" |
| 36 #include "platform/exported/WrappedResourceResponse.h" | 36 #include "platform/exported/WrappedResourceResponse.h" |
| 37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 38 #include "platform/weborigin/KURL.h" | 38 #include "platform/weborigin/KURL.h" |
| 39 #include "public/web/WebDataSource.h" | 39 #include "public/web/WebDataSource.h" |
| 40 #include "wtf/OwnPtr.h" |
| 41 #include "wtf/PassOwnPtr.h" |
| 40 #include "wtf/Vector.h" | 42 #include "wtf/Vector.h" |
| 41 #include <memory> | |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 | 45 |
| 45 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { | 46 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { |
| 46 public: | 47 public: |
| 47 static WebDataSourceImpl* create(LocalFrame*, const ResourceRequest&, const
SubstituteData&); | 48 static WebDataSourceImpl* create(LocalFrame*, const ResourceRequest&, const
SubstituteData&); |
| 48 | 49 |
| 49 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) | 50 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) |
| 50 { | 51 { |
| 51 return static_cast<WebDataSourceImpl*>(loader); | 52 return static_cast<WebDataSourceImpl*>(loader); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 76 ~WebDataSourceImpl() override; | 77 ~WebDataSourceImpl() override; |
| 77 void detachFromFrame() override; | 78 void detachFromFrame() override; |
| 78 String debugName() const override { return "WebDataSourceImpl"; } | 79 String debugName() const override { return "WebDataSourceImpl"; } |
| 79 | 80 |
| 80 // Mutable because the const getters will magically sync these to the | 81 // Mutable because the const getters will magically sync these to the |
| 81 // latest version from WebKit. | 82 // latest version from WebKit. |
| 82 mutable WrappedResourceRequest m_originalRequestWrapper; | 83 mutable WrappedResourceRequest m_originalRequestWrapper; |
| 83 mutable WrappedResourceRequest m_requestWrapper; | 84 mutable WrappedResourceRequest m_requestWrapper; |
| 84 mutable WrappedResourceResponse m_responseWrapper; | 85 mutable WrappedResourceResponse m_responseWrapper; |
| 85 | 86 |
| 86 std::unique_ptr<ExtraData> m_extraData; | 87 OwnPtr<ExtraData> m_extraData; |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namespace blink | 90 } // namespace blink |
| 90 | 91 |
| 91 #endif // WebDataSourceImpl_h | 92 #endif // WebDataSourceImpl_h |
| OLD | NEW |