OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 NotificationObjectProxy( | 27 NotificationObjectProxy( |
28 content::RenderFrameHost* render_frame_host, | 28 content::RenderFrameHost* render_frame_host, |
29 scoped_ptr<content::DesktopNotificationDelegate> delegate); | 29 scoped_ptr<content::DesktopNotificationDelegate> delegate); |
30 | 30 |
31 // NotificationDelegate implementation. | 31 // NotificationDelegate implementation. |
32 virtual void Display() OVERRIDE; | 32 virtual void Display() OVERRIDE; |
33 virtual void Error() OVERRIDE; | 33 virtual void Error() OVERRIDE; |
34 virtual void Close(bool by_user) OVERRIDE; | 34 virtual void Close(bool by_user) OVERRIDE; |
35 virtual void Click() OVERRIDE; | 35 virtual void Click() OVERRIDE; |
36 virtual std::string id() const OVERRIDE; | 36 virtual std::string id() const OVERRIDE; |
37 virtual int process_id() const OVERRIDE; | |
38 virtual content::WebContents* GetWebContents() const OVERRIDE; | 37 virtual content::WebContents* GetWebContents() const OVERRIDE; |
39 | 38 |
40 protected: | 39 protected: |
41 friend class base::RefCountedThreadSafe<NotificationObjectProxy>; | 40 friend class base::RefCountedThreadSafe<NotificationObjectProxy>; |
42 | 41 |
43 virtual ~NotificationObjectProxy(); | 42 virtual ~NotificationObjectProxy(); |
44 | 43 |
45 private: | 44 private: |
46 // Callback information to find the JS Notification object where it lives. | 45 // Callback information to find the JS Notification object where it lives. |
47 int render_process_id_; | 46 int render_process_id_; |
48 int render_frame_id_; | 47 int render_frame_id_; |
49 scoped_ptr<content::DesktopNotificationDelegate> delegate_; | 48 scoped_ptr<content::DesktopNotificationDelegate> delegate_; |
50 bool displayed_; | 49 bool displayed_; |
51 std::string id_; | 50 std::string id_; |
52 }; | 51 }; |
53 | 52 |
54 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ | 53 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ |
OLD | NEW |