Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: third_party/WebKit/Source/web/WebDataSourceImpl.cpp

Issue 1442643003: Oilpan: move WebPluginLoadObserver to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: provide clearPluginContainer() w/ non-Oilpan only Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 #include "config.h" 31 #include "config.h"
32 #include "web/WebDataSourceImpl.h" 32 #include "web/WebDataSourceImpl.h"
33 33
34 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
35 #include "public/platform/WebURL.h" 35 #include "public/platform/WebURL.h"
36 #include "public/platform/WebURLError.h" 36 #include "public/platform/WebURLError.h"
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 OwnPtrWillBePersistent<WebPluginLoadObserver>& nextPluginLoadObserver()
42 { 42 {
43 DEFINE_STATIC_LOCAL(OwnPtr<WebPluginLoadObserver>, nextPluginLoadObserver, ( )); 43 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WebPluginLoadObserver>, nextPlugi nLoadObserver, ());
44 return nextPluginLoadObserver; 44 return nextPluginLoadObserver;
45 } 45 }
46 46
47 PassRefPtrWillBeRawPtr<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 adoptRefWillBeNoop(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 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 case NavigationTypeReload: 130 case NavigationTypeReload:
131 return WebNavigationTypeReload; 131 return WebNavigationTypeReload;
132 case NavigationTypeFormResubmitted: 132 case NavigationTypeFormResubmitted:
133 return WebNavigationTypeFormResubmitted; 133 return WebNavigationTypeFormResubmitted;
134 case NavigationTypeOther: 134 case NavigationTypeOther:
135 default: 135 default:
136 return WebNavigationTypeOther; 136 return WebNavigationTypeOther;
137 } 137 }
138 } 138 }
139 139
140 void WebDataSourceImpl::setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserv er> observer) 140 void WebDataSourceImpl::setNextPluginLoadObserver(PassOwnPtrWillBeRawPtr<WebPlug inLoadObserver> observer)
141 { 141 {
142 nextPluginLoadObserver() = observer; 142 nextPluginLoadObserver() = observer;
143 } 143 }
144 144
145 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, const ResourceRequest& r equest, const SubstituteData& data) 145 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, const ResourceRequest& r equest, const SubstituteData& data)
146 : DocumentLoader(frame, request, data) 146 : DocumentLoader(frame, request, data)
147 { 147 {
148 if (!nextPluginLoadObserver()) 148 if (!nextPluginLoadObserver())
149 return; 149 return;
150 // When a new frame is created, it initially gets a data source for an 150 // When a new frame is created, it initially gets a data source for an
(...skipping 17 matching lines...) Expand all
168 { 168 {
169 RefPtrWillBeRawPtr<DocumentLoader> protect(this); 169 RefPtrWillBeRawPtr<DocumentLoader> protect(this);
170 170
171 DocumentLoader::detachFromFrame(); 171 DocumentLoader::detachFromFrame();
172 m_extraData.clear(); 172 m_extraData.clear();
173 m_pluginLoadObserver.clear(); 173 m_pluginLoadObserver.clear();
174 } 174 }
175 175
176 DEFINE_TRACE(WebDataSourceImpl) 176 DEFINE_TRACE(WebDataSourceImpl)
177 { 177 {
178 visitor->trace(m_pluginLoadObserver);
178 DocumentLoader::trace(visitor); 179 DocumentLoader::trace(visitor);
179 } 180 }
180 181
181 } // namespace blink 182 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDataSourceImpl.h ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698