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

Unified Diff: third_party/WebKit/Source/web/WebPluginLoadObserver.h

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebPluginLoadObserver.h
diff --git a/third_party/WebKit/Source/web/WebPluginLoadObserver.h b/third_party/WebKit/Source/web/WebPluginLoadObserver.h
index 3e191686bda790dafd30e127c3af694dca2be4a0..25ecd7a1cd21cf29c4a0e7d07367a8fa6010cfa7 100644
--- a/third_party/WebKit/Source/web/WebPluginLoadObserver.h
+++ b/third_party/WebKit/Source/web/WebPluginLoadObserver.h
@@ -31,6 +31,7 @@
#ifndef WebPluginLoadObserver_h
#define WebPluginLoadObserver_h
+#include "platform/heap/Handle.h"
#include "public/platform/WebURL.h"
namespace blink {
@@ -38,26 +39,33 @@ namespace blink {
class WebPluginContainerImpl;
struct WebURLError;
-class WebPluginLoadObserver {
+class WebPluginLoadObserver final : public NoBaseWillBeGarbageCollectedFinalized<WebPluginLoadObserver> {
public:
- WebPluginLoadObserver(WebPluginContainerImpl* pluginContainer,
- const WebURL& notifyURL, void* notifyData)
- : m_pluginContainer(pluginContainer)
- , m_notifyURL(notifyURL)
- , m_notifyData(notifyData)
+ static PassOwnPtrWillBeRawPtr<WebPluginLoadObserver> create(WebPluginContainerImpl* pluginContainer, const WebURL& notifyURL, void* notifyData)
{
+ return adoptPtrWillBeNoop(new WebPluginLoadObserver(pluginContainer, notifyURL, notifyData));
}
-
~WebPluginLoadObserver();
const WebURL& url() const { return m_notifyURL; }
- void clearPluginContainer() { m_pluginContainer = 0; }
+#if !ENABLE(OILPAN)
+ void clearPluginContainer() { m_pluginContainer = nullptr; }
+#endif
void didFinishLoading();
void didFailLoading(const WebURLError&);
+ DECLARE_TRACE();
+
private:
- WebPluginContainerImpl* m_pluginContainer;
+ WebPluginLoadObserver(WebPluginContainerImpl* pluginContainer, const WebURL& notifyURL, void* notifyData)
+ : m_pluginContainer(pluginContainer)
+ , m_notifyURL(notifyURL)
+ , m_notifyData(notifyData)
+ {
+ }
+
+ RawPtrWillBeWeakMember<WebPluginContainerImpl> m_pluginContainer;
WebURL m_notifyURL;
void* m_notifyData;
};
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.cpp ('k') | third_party/WebKit/Source/web/WebPluginLoadObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698