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 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 // Creates a Proxy object with the necessary callback information. The Proxy | 23 // Creates a Proxy object with the necessary callback information. The Proxy |
24 // will take ownership of |delegate|. | 24 // will take ownership of |delegate|. |
25 NotificationObjectProxy( | 25 NotificationObjectProxy( |
26 scoped_ptr<content::DesktopNotificationDelegate> delegate); | 26 scoped_ptr<content::DesktopNotificationDelegate> delegate); |
27 | 27 |
28 // NotificationDelegate implementation. | 28 // NotificationDelegate implementation. |
29 void Display() override; | 29 void Display() override; |
30 void Close(bool by_user) override; | 30 void Close(bool by_user) override; |
31 void Click() override; | 31 void Click() override; |
| 32 void ButtonClick(int button_index) override; |
32 std::string id() const override; | 33 std::string id() const override; |
33 | 34 |
34 protected: | 35 protected: |
35 ~NotificationObjectProxy() override; | 36 ~NotificationObjectProxy() override; |
36 | 37 |
37 private: | 38 private: |
38 scoped_ptr<content::DesktopNotificationDelegate> delegate_; | 39 scoped_ptr<content::DesktopNotificationDelegate> delegate_; |
39 bool displayed_; | 40 bool displayed_; |
40 std::string id_; | 41 std::string id_; |
41 }; | 42 }; |
42 | 43 |
43 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ | 44 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_ |
OLD | NEW |