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 26 matching lines...) Expand all Loading... |
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 "web/WebPluginLoadObserver.h" | 40 #include "web/WebPluginLoadObserver.h" |
41 #include "wtf/OwnPtr.h" | 41 #include "wtf/OwnPtr.h" |
42 #include "wtf/PassOwnPtr.h" | 42 #include "wtf/PassOwnPtr.h" |
43 #include "wtf/Vector.h" | 43 #include "wtf/Vector.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 class WebPluginLoadObserver; | |
48 | |
49 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { | 47 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { |
50 public: | 48 public: |
51 static PassRefPtrWillBeRawPtr<WebDataSourceImpl> create(LocalFrame*, const R
esourceRequest&, const SubstituteData&); | 49 static PassRefPtrWillBeRawPtr<WebDataSourceImpl> create(LocalFrame*, const R
esourceRequest&, const SubstituteData&); |
52 | 50 |
53 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) | 51 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) |
54 { | 52 { |
55 return static_cast<WebDataSourceImpl*>(loader); | 53 return static_cast<WebDataSourceImpl*>(loader); |
56 } | 54 } |
57 | 55 |
58 // WebDataSource methods: | 56 // WebDataSource methods: |
59 const WebURLRequest& originalRequest() const override; | 57 const WebURLRequest& originalRequest() const override; |
60 const WebURLRequest& request() const override; | 58 const WebURLRequest& request() const override; |
61 const WebURLResponse& response() const override; | 59 const WebURLResponse& response() const override; |
62 bool hasUnreachableURL() const override; | 60 bool hasUnreachableURL() const override; |
63 WebURL unreachableURL() const override; | 61 WebURL unreachableURL() const override; |
64 void appendRedirect(const WebURL&) override; | 62 void appendRedirect(const WebURL&) override; |
65 void redirectChain(WebVector<WebURL>&) const override; | 63 void redirectChain(WebVector<WebURL>&) const override; |
66 bool isClientRedirect() const override; | 64 bool isClientRedirect() const override; |
67 bool replacesCurrentHistoryItem() const override; | 65 bool replacesCurrentHistoryItem() const override; |
68 WebNavigationType navigationType() const override; | 66 WebNavigationType navigationType() const override; |
69 ExtraData* extraData() const override; | 67 ExtraData* extraData() const override; |
70 void setExtraData(ExtraData*) override; | 68 void setExtraData(ExtraData*) override; |
71 void setNavigationStartTime(double) override; | 69 void setNavigationStartTime(double) override; |
72 | 70 |
73 static WebNavigationType toWebNavigationType(NavigationType); | 71 static WebNavigationType toWebNavigationType(NavigationType); |
74 | 72 |
75 PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_plu
ginLoadObserver.release(); } | 73 PassOwnPtrWillBeRawPtr<WebPluginLoadObserver> releasePluginLoadObserver() {
return m_pluginLoadObserver.release(); } |
76 static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>); | 74 static void setNextPluginLoadObserver(PassOwnPtrWillBeRawPtr<WebPluginLoadOb
server>); |
77 | 75 |
78 DECLARE_VIRTUAL_TRACE(); | 76 DECLARE_VIRTUAL_TRACE(); |
79 | 77 |
80 private: | 78 private: |
81 WebDataSourceImpl(LocalFrame*, const ResourceRequest&, const SubstituteData&
); | 79 WebDataSourceImpl(LocalFrame*, const ResourceRequest&, const SubstituteData&
); |
82 ~WebDataSourceImpl() override; | 80 ~WebDataSourceImpl() override; |
83 void detachFromFrame() override; | 81 void detachFromFrame() override; |
84 String debugName() const override { return "WebDataSourceImpl"; } | 82 String debugName() const override { return "WebDataSourceImpl"; } |
85 | 83 |
86 // Mutable because the const getters will magically sync these to the | 84 // Mutable because the const getters will magically sync these to the |
87 // latest version from WebKit. | 85 // latest version from WebKit. |
88 mutable WrappedResourceRequest m_originalRequestWrapper; | 86 mutable WrappedResourceRequest m_originalRequestWrapper; |
89 mutable WrappedResourceRequest m_requestWrapper; | 87 mutable WrappedResourceRequest m_requestWrapper; |
90 mutable WrappedResourceResponse m_responseWrapper; | 88 mutable WrappedResourceResponse m_responseWrapper; |
91 | 89 |
92 OwnPtr<ExtraData> m_extraData; | 90 OwnPtr<ExtraData> m_extraData; |
93 OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver; | 91 OwnPtrWillBeMember<WebPluginLoadObserver> m_pluginLoadObserver; |
94 }; | 92 }; |
95 | 93 |
96 } // namespace blink | 94 } // namespace blink |
97 | 95 |
98 #endif // WebDataSourceImpl_h | 96 #endif // WebDataSourceImpl_h |
OLD | NEW |