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

Unified Diff: chrome/browser/notifications/notification_object_proxy.h

Issue 433273002: NotificationObjectProxy should own the DesktopNotificationDelegateImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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: 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..c123e9a8d5046189a87bfde797e034b7cda17442 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,7 +22,8 @@ class RenderFrameHost;
class NotificationObjectProxy
: public NotificationDelegate {
public:
- // Creates a Proxy object with the necessary callback information.
+ // Creates a Proxy object with the necessary callback information. The Proxy
+ // will take ownership of |delegate|.
NotificationObjectProxy(content::RenderFrameHost* render_frame_host,
content::DesktopNotificationDelegate* delegate);
jochen (gone - plz use gerrit) 2014/08/04 09:11:24 you could make the parameter a scoped_ptr<> to mak
Peter Beverloo 2014/08/04 11:33:34 Done. Plumbed through the ContentBrowserClient as
@@ -37,13 +39,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_;
};
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | chrome/browser/notifications/notification_object_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698