| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 const WebURLRequest& WebDataSourceImpl::request() const | 54 const WebURLRequest& WebDataSourceImpl::request() const |
| 55 { | 55 { |
| 56 m_requestWrapper.bind(DocumentLoader::request()); | 56 m_requestWrapper.bind(DocumentLoader::request()); |
| 57 return m_requestWrapper; | 57 return m_requestWrapper; |
| 58 } | 58 } |
| 59 | 59 |
| 60 const WebURLResponse& WebDataSourceImpl::response() const | 60 const WebURLResponse& WebDataSourceImpl::response() const |
| 61 { | 61 { |
| 62 m_responseWrapper.bind(DocumentLoader::response()); | |
| 63 return m_responseWrapper; | 62 return m_responseWrapper; |
| 64 } | 63 } |
| 65 | 64 |
| 66 bool WebDataSourceImpl::hasUnreachableURL() const | 65 bool WebDataSourceImpl::hasUnreachableURL() const |
| 67 { | 66 { |
| 68 return !DocumentLoader::unreachableURL().isEmpty(); | 67 return !DocumentLoader::unreachableURL().isEmpty(); |
| 69 } | 68 } |
| 70 | 69 |
| 71 WebURL WebDataSourceImpl::unreachableURL() const | 70 WebURL WebDataSourceImpl::unreachableURL() const |
| 72 { | 71 { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 case NavigationTypeFormResubmitted: | 127 case NavigationTypeFormResubmitted: |
| 129 return WebNavigationTypeFormResubmitted; | 128 return WebNavigationTypeFormResubmitted; |
| 130 case NavigationTypeOther: | 129 case NavigationTypeOther: |
| 131 default: | 130 default: |
| 132 return WebNavigationTypeOther; | 131 return WebNavigationTypeOther; |
| 133 } | 132 } |
| 134 } | 133 } |
| 135 | 134 |
| 136 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, const ResourceRequest& r
equest, const SubstituteData& data) | 135 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, const ResourceRequest& r
equest, const SubstituteData& data) |
| 137 : DocumentLoader(frame, request, data) | 136 : DocumentLoader(frame, request, data) |
| 137 , m_responseWrapper(DocumentLoader::response()) |
| 138 { | 138 { |
| 139 } | 139 } |
| 140 | 140 |
| 141 WebDataSourceImpl::~WebDataSourceImpl() | 141 WebDataSourceImpl::~WebDataSourceImpl() |
| 142 { | 142 { |
| 143 // Verify that detachFromFrame() has been called. | 143 // Verify that detachFromFrame() has been called. |
| 144 DCHECK(!m_extraData); | 144 DCHECK(!m_extraData); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void WebDataSourceImpl::detachFromFrame() | 147 void WebDataSourceImpl::detachFromFrame() |
| 148 { | 148 { |
| 149 DocumentLoader::detachFromFrame(); | 149 DocumentLoader::detachFromFrame(); |
| 150 m_extraData.reset(); | 150 m_extraData.reset(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void WebDataSourceImpl::setSubresourceFilter(WebDocumentSubresourceFilter* subre
sourceFilter) | 153 void WebDataSourceImpl::setSubresourceFilter(WebDocumentSubresourceFilter* subre
sourceFilter) |
| 154 { | 154 { |
| 155 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); | 155 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); |
| 156 } | 156 } |
| 157 | 157 |
| 158 DEFINE_TRACE(WebDataSourceImpl) | 158 DEFINE_TRACE(WebDataSourceImpl) |
| 159 { | 159 { |
| 160 DocumentLoader::trace(visitor); | 160 DocumentLoader::trace(visitor); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace blink | 163 } // namespace blink |
| OLD | NEW |