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