| 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 26 matching lines...) Expand all Loading... |
| 37 #include "public/platform/WebVector.h" | 37 #include "public/platform/WebVector.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 static OwnPtr<WebPluginLoadObserver>& nextPluginLoadObserver() | 41 static OwnPtr<WebPluginLoadObserver>& nextPluginLoadObserver() |
| 42 { | 42 { |
| 43 DEFINE_STATIC_LOCAL(OwnPtr<WebPluginLoadObserver>, nextPluginLoadObserver, (
)); | 43 DEFINE_STATIC_LOCAL(OwnPtr<WebPluginLoadObserver>, nextPluginLoadObserver, (
)); |
| 44 return nextPluginLoadObserver; | 44 return nextPluginLoadObserver; |
| 45 } | 45 } |
| 46 | 46 |
| 47 PassRefPtr<WebDataSourceImpl> WebDataSourceImpl::create(LocalFrame* frame, const
ResourceRequest& request, const SubstituteData& data) | 47 PassRefPtrWillBeRawPtr<WebDataSourceImpl> WebDataSourceImpl::create(LocalFrame*
frame, const ResourceRequest& request, const SubstituteData& data) |
| 48 { | 48 { |
| 49 return adoptRef(new WebDataSourceImpl(frame, request, data)); | 49 return adoptRefWillBeNoop(new WebDataSourceImpl(frame, request, data)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 const WebURLRequest& WebDataSourceImpl::originalRequest() const | 52 const WebURLRequest& WebDataSourceImpl::originalRequest() const |
| 53 { | 53 { |
| 54 m_originalRequestWrapper.bind(DocumentLoader::originalRequest()); | 54 m_originalRequestWrapper.bind(DocumentLoader::originalRequest()); |
| 55 return m_originalRequestWrapper; | 55 return m_originalRequestWrapper; |
| 56 } | 56 } |
| 57 | 57 |
| 58 const WebURLRequest& WebDataSourceImpl::request() const | 58 const WebURLRequest& WebDataSourceImpl::request() const |
| 59 { | 59 { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return; | 155 return; |
| 156 | 156 |
| 157 ASSERT(nextPluginLoadObserver()->url() == WebURL(request.url())); | 157 ASSERT(nextPluginLoadObserver()->url() == WebURL(request.url())); |
| 158 m_pluginLoadObserver = nextPluginLoadObserver().release(); | 158 m_pluginLoadObserver = nextPluginLoadObserver().release(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 WebDataSourceImpl::~WebDataSourceImpl() | 161 WebDataSourceImpl::~WebDataSourceImpl() |
| 162 { | 162 { |
| 163 } | 163 } |
| 164 | 164 |
| 165 void WebDataSourceImpl::detachFromFrame() |
| 166 { |
| 167 RefPtrWillBeRawPtr<DocumentLoader> protect(this); |
| 168 |
| 169 DocumentLoader::detachFromFrame(); |
| 170 m_extraData.clear(); |
| 171 m_pluginLoadObserver.clear(); |
| 172 } |
| 173 |
| 174 DEFINE_TRACE(WebDataSourceImpl) |
| 175 { |
| 176 DocumentLoader::trace(visitor); |
| 177 } |
| 178 |
| 165 } // namespace blink | 179 } // namespace blink |
| OLD | NEW |