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 21 matching lines...) Expand all Loading... |
32 #define WebDataSourceImpl_h | 32 #define WebDataSourceImpl_h |
33 | 33 |
34 // FIXME: This relative path is a temporary hack to support using this | 34 // FIXME: This relative path is a temporary hack to support using this |
35 // header from webkit/glue. | 35 // header from webkit/glue. |
36 #include "../public/WebDataSource.h" | 36 #include "../public/WebDataSource.h" |
37 #include "WebPluginLoadObserver.h" | 37 #include "WebPluginLoadObserver.h" |
38 #include "WrappedResourceRequest.h" | 38 #include "WrappedResourceRequest.h" |
39 #include "WrappedResourceResponse.h" | 39 #include "WrappedResourceResponse.h" |
40 | 40 |
41 #include "DocumentLoader.h" | 41 #include "DocumentLoader.h" |
| 42 #include "KURL.h" |
42 #include <wtf/PassOwnPtr.h> | 43 #include <wtf/PassOwnPtr.h> |
43 #include <wtf/OwnPtr.h> | 44 #include <wtf/OwnPtr.h> |
44 #include <wtf/Vector.h> | 45 #include <wtf/Vector.h> |
45 | 46 |
46 namespace WebKit { | 47 namespace WebKit { |
47 class WebPluginLoadObserver; | 48 class WebPluginLoadObserver; |
48 | 49 |
49 class WebDataSourceImpl : public WebCore::DocumentLoader, public WebDataSource { | 50 class WebDataSourceImpl : public WebCore::DocumentLoader, public WebDataSource { |
50 public: | 51 public: |
51 static PassRefPtr<WebDataSourceImpl> create(const WebCore::ResourceRequest&, | 52 static PassRefPtr<WebDataSourceImpl> create(const WebCore::ResourceRequest&, |
(...skipping 13 matching lines...) Expand all Loading... |
65 virtual void redirectChain(WebVector<WebURL>&) const; | 66 virtual void redirectChain(WebVector<WebURL>&) const; |
66 virtual WebString pageTitle() const; | 67 virtual WebString pageTitle() const; |
67 virtual WebNavigationType navigationType() const; | 68 virtual WebNavigationType navigationType() const; |
68 virtual double triggeringEventTime() const; | 69 virtual double triggeringEventTime() const; |
69 virtual ExtraData* extraData() const; | 70 virtual ExtraData* extraData() const; |
70 virtual void setExtraData(ExtraData*); | 71 virtual void setExtraData(ExtraData*); |
71 | 72 |
72 static WebNavigationType toWebNavigationType(WebCore::NavigationType type); | 73 static WebNavigationType toWebNavigationType(WebCore::NavigationType type); |
73 | 74 |
74 bool hasRedirectChain() const { return !m_redirectChain.isEmpty(); } | 75 bool hasRedirectChain() const { return !m_redirectChain.isEmpty(); } |
75 WebURL endOfRedirectChain() const; | 76 const WebCore::KURL& endOfRedirectChain() const; |
76 void clearRedirectChain(); | 77 void clearRedirectChain(); |
77 void appendRedirect(const WebURL& url); | 78 void appendRedirect(const WebCore::KURL& url); |
78 | 79 |
79 PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_pluginLoadObserver.release(); } | 80 PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_pluginLoadObserver.release(); } |
80 static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>); | 81 static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>); |
81 | 82 |
82 private: | 83 private: |
83 WebDataSourceImpl(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); | 84 WebDataSourceImpl(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); |
84 ~WebDataSourceImpl(); | 85 ~WebDataSourceImpl(); |
85 | 86 |
86 // Mutable because the const getters will magically sync these to the | 87 // Mutable because the const getters will magically sync these to the |
87 // latest version from WebKit. | 88 // latest version from WebKit. |
88 mutable WrappedResourceRequest m_originalRequestWrapper; | 89 mutable WrappedResourceRequest m_originalRequestWrapper; |
89 mutable WrappedResourceRequest m_requestWrapper; | 90 mutable WrappedResourceRequest m_requestWrapper; |
90 mutable WrappedResourceResponse m_responseWrapper; | 91 mutable WrappedResourceResponse m_responseWrapper; |
91 | 92 |
92 // Lists all intermediate URLs that have redirected for the current provisional load. | 93 // Lists all intermediate URLs that have redirected for the current provisional load. |
93 // See WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad for a | 94 // See WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad for a |
94 // description of who modifies this when to keep it up to date. | 95 // description of who modifies this when to keep it up to date. |
95 Vector<WebURL> m_redirectChain; | 96 Vector<WebCore::KURL> m_redirectChain; |
96 | 97 |
97 OwnPtr<ExtraData> m_extraData; | 98 OwnPtr<ExtraData> m_extraData; |
98 OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver; | 99 OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver; |
99 | 100 |
100 static WebPluginLoadObserver* m_nextPluginLoadObserver; | 101 static WebPluginLoadObserver* m_nextPluginLoadObserver; |
101 }; | 102 }; |
102 | 103 |
103 } // namespace WebKit | 104 } // namespace WebKit |
104 | 105 |
105 #endif // WebDataSourceImpl_h | 106 #endif // WebDataSourceImpl_h |
OLD | NEW |