Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: Source/web/WebDataSourceImpl.h

Issue 1194003004: Oilpan: enable appcache + move DocumentLoader to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/WebDataSourceImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
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/weborigin/KURL.h" 38 #include "platform/weborigin/KURL.h"
38 #include "public/web/WebDataSource.h" 39 #include "public/web/WebDataSource.h"
39 #include "web/WebPluginLoadObserver.h" 40 #include "web/WebPluginLoadObserver.h"
40 #include "wtf/OwnPtr.h" 41 #include "wtf/OwnPtr.h"
41 #include "wtf/PassOwnPtr.h" 42 #include "wtf/PassOwnPtr.h"
42 #include "wtf/Vector.h" 43 #include "wtf/Vector.h"
43 44
44 namespace blink { 45 namespace blink {
45 46
46 class WebPluginLoadObserver; 47 class WebPluginLoadObserver;
47 48
48 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { 49 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource {
49 public: 50 public:
50 static PassRefPtr<WebDataSourceImpl> create(LocalFrame*, const ResourceReque st&, const SubstituteData&); 51 static PassRefPtrWillBeRawPtr<WebDataSourceImpl> create(LocalFrame*, const R esourceRequest&, const SubstituteData&);
51 52
52 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) 53 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader)
53 { 54 {
54 return static_cast<WebDataSourceImpl*>(loader); 55 return static_cast<WebDataSourceImpl*>(loader);
55 } 56 }
56 57
57 // WebDataSource methods: 58 // WebDataSource methods:
58 virtual const WebURLRequest& originalRequest() const override; 59 virtual const WebURLRequest& originalRequest() const override;
59 virtual const WebURLRequest& request() const override; 60 virtual const WebURLRequest& request() const override;
60 virtual const WebURLResponse& response() const override; 61 virtual const WebURLResponse& response() const override;
61 virtual bool hasUnreachableURL() const override; 62 virtual bool hasUnreachableURL() const override;
62 virtual WebURL unreachableURL() const override; 63 virtual WebURL unreachableURL() const override;
63 virtual void appendRedirect(const WebURL&) override; 64 virtual void appendRedirect(const WebURL&) override;
64 virtual void redirectChain(WebVector<WebURL>&) const override; 65 virtual void redirectChain(WebVector<WebURL>&) const override;
65 virtual bool isClientRedirect() const override; 66 virtual bool isClientRedirect() const override;
66 virtual bool replacesCurrentHistoryItem() const override; 67 virtual bool replacesCurrentHistoryItem() const override;
67 virtual WebNavigationType navigationType() const override; 68 virtual WebNavigationType navigationType() const override;
68 virtual ExtraData* extraData() const override; 69 virtual ExtraData* extraData() const override;
69 virtual void setExtraData(ExtraData*) override; 70 virtual void setExtraData(ExtraData*) override;
70 virtual void setNavigationStartTime(double) override; 71 virtual void setNavigationStartTime(double) override;
71 72
72 static WebNavigationType toWebNavigationType(NavigationType); 73 static WebNavigationType toWebNavigationType(NavigationType);
73 74
74 PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_plu ginLoadObserver.release(); } 75 PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_plu ginLoadObserver.release(); }
75 static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>); 76 static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>);
76 77
78 DECLARE_VIRTUAL_TRACE();
79
77 private: 80 private:
78 WebDataSourceImpl(LocalFrame*, const ResourceRequest&, const SubstituteData& ); 81 WebDataSourceImpl(LocalFrame*, const ResourceRequest&, const SubstituteData& );
79 virtual ~WebDataSourceImpl(); 82 virtual ~WebDataSourceImpl();
83 virtual void detachFromFrame() override;
80 84
81 // Mutable because the const getters will magically sync these to the 85 // Mutable because the const getters will magically sync these to the
82 // latest version from WebKit. 86 // latest version from WebKit.
83 mutable WrappedResourceRequest m_originalRequestWrapper; 87 mutable WrappedResourceRequest m_originalRequestWrapper;
84 mutable WrappedResourceRequest m_requestWrapper; 88 mutable WrappedResourceRequest m_requestWrapper;
85 mutable WrappedResourceResponse m_responseWrapper; 89 mutable WrappedResourceResponse m_responseWrapper;
86 90
87 OwnPtr<ExtraData> m_extraData; 91 OwnPtr<ExtraData> m_extraData;
88 OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver; 92 OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver;
89 }; 93 };
90 94
91 } // namespace blink 95 } // namespace blink
92 96
93 #endif // WebDataSourceImpl_h 97 #endif // WebDataSourceImpl_h
OLDNEW
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/WebDataSourceImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698