| 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 "public/web/WebDataSource.h" | 38 #include "public/web/WebDataSource.h" |
| 39 #include "web/WebPluginLoadObserver.h" | 39 #include "web/WebPluginLoadObserver.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 FINAL : public DocumentLoader, public WebDataSource { | 48 class WebDataSourceImpl final : public DocumentLoader, public WebDataSource { |
| 49 public: | 49 public: |
| 50 static PassRefPtr<WebDataSourceImpl> create(LocalFrame*, const ResourceReque
st&, const SubstituteData&); | 50 static PassRefPtr<WebDataSourceImpl> create(LocalFrame*, const ResourceReque
st&, const SubstituteData&); |
| 51 | 51 |
| 52 static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) | 52 static WebDataSourceImpl* fromDocumentLoader(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 OVERRIDE; | 58 virtual const WebURLRequest& originalRequest() const override; |
| 59 virtual const WebURLRequest& request() const OVERRIDE; | 59 virtual const WebURLRequest& request() const override; |
| 60 virtual const WebURLResponse& response() const OVERRIDE; | 60 virtual const WebURLResponse& response() const override; |
| 61 virtual bool hasUnreachableURL() const OVERRIDE; | 61 virtual bool hasUnreachableURL() const override; |
| 62 virtual WebURL unreachableURL() const OVERRIDE; | 62 virtual WebURL unreachableURL() const override; |
| 63 virtual void appendRedirect(const WebURL&) OVERRIDE; | 63 virtual void appendRedirect(const WebURL&) override; |
| 64 virtual void redirectChain(WebVector<WebURL>&) const OVERRIDE; | 64 virtual void redirectChain(WebVector<WebURL>&) const override; |
| 65 virtual bool isClientRedirect() const OVERRIDE; | 65 virtual bool isClientRedirect() const override; |
| 66 virtual bool replacesCurrentHistoryItem() const OVERRIDE; | 66 virtual bool replacesCurrentHistoryItem() const override; |
| 67 virtual WebNavigationType navigationType() const OVERRIDE; | 67 virtual WebNavigationType navigationType() const override; |
| 68 virtual double triggeringEventTime() const OVERRIDE; | 68 virtual double triggeringEventTime() const override; |
| 69 virtual ExtraData* extraData() const OVERRIDE; | 69 virtual ExtraData* extraData() const override; |
| 70 virtual void setExtraData(ExtraData*) OVERRIDE; | 70 virtual void setExtraData(ExtraData*) override; |
| 71 virtual void setNavigationStartTime(double) OVERRIDE; | 71 virtual void setNavigationStartTime(double) override; |
| 72 | 72 |
| 73 static WebNavigationType toWebNavigationType(NavigationType); | 73 static WebNavigationType toWebNavigationType(NavigationType); |
| 74 | 74 |
| 75 PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_plu
ginLoadObserver.release(); } | 75 PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_plu
ginLoadObserver.release(); } |
| 76 static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>); | 76 static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>); |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 WebDataSourceImpl(LocalFrame*, const ResourceRequest&, const SubstituteData&
); | 79 WebDataSourceImpl(LocalFrame*, const ResourceRequest&, const SubstituteData&
); |
| 80 virtual ~WebDataSourceImpl(); | 80 virtual ~WebDataSourceImpl(); |
| 81 | 81 |
| 82 // Mutable because the const getters will magically sync these to the | 82 // Mutable because the const getters will magically sync these to the |
| 83 // latest version from WebKit. | 83 // latest version from WebKit. |
| 84 mutable WrappedResourceRequest m_originalRequestWrapper; | 84 mutable WrappedResourceRequest m_originalRequestWrapper; |
| 85 mutable WrappedResourceRequest m_requestWrapper; | 85 mutable WrappedResourceRequest m_requestWrapper; |
| 86 mutable WrappedResourceResponse m_responseWrapper; | 86 mutable WrappedResourceResponse m_responseWrapper; |
| 87 | 87 |
| 88 OwnPtr<ExtraData> m_extraData; | 88 OwnPtr<ExtraData> m_extraData; |
| 89 OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver; | 89 OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace blink | 92 } // namespace blink |
| 93 | 93 |
| 94 #endif // WebDataSourceImpl_h | 94 #endif // WebDataSourceImpl_h |
| OLD | NEW |