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; |
}; |