| Index: chrome/browser/notifications/notification_object_proxy.h
|
| diff --git a/chrome/browser/notifications/notification_object_proxy.h b/chrome/browser/notifications/notification_object_proxy.h
|
| index 9870ac10e3de40266392f50e78a87bcbc3961638..a6014b0075ae283fc1e798b27738f2779a829b8f 100644
|
| --- a/chrome/browser/notifications/notification_object_proxy.h
|
| +++ b/chrome/browser/notifications/notification_object_proxy.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "chrome/browser/notifications/notification_delegate.h"
|
|
|
| namespace content {
|
| @@ -21,9 +22,11 @@ class RenderFrameHost;
|
| class NotificationObjectProxy
|
| : public NotificationDelegate {
|
| public:
|
| - // Creates a Proxy object with the necessary callback information.
|
| - NotificationObjectProxy(content::RenderFrameHost* render_frame_host,
|
| - content::DesktopNotificationDelegate* delegate);
|
| + // Creates a Proxy object with the necessary callback information. The Proxy
|
| + // will take ownership of |delegate|.
|
| + NotificationObjectProxy(
|
| + content::RenderFrameHost* render_frame_host,
|
| + scoped_ptr<content::DesktopNotificationDelegate> delegate);
|
|
|
| // NotificationDelegate implementation.
|
| virtual void Display() OVERRIDE;
|
| @@ -37,13 +40,13 @@ class NotificationObjectProxy
|
| protected:
|
| friend class base::RefCountedThreadSafe<NotificationObjectProxy>;
|
|
|
| - virtual ~NotificationObjectProxy() {}
|
| + virtual ~NotificationObjectProxy();
|
|
|
| private:
|
| // Callback information to find the JS Notification object where it lives.
|
| int render_process_id_;
|
| int render_frame_id_;
|
| - content::DesktopNotificationDelegate* delegate_;
|
| + scoped_ptr<content::DesktopNotificationDelegate> delegate_;
|
| bool displayed_;
|
| std::string id_;
|
| };
|
|
|