OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 #endif // ENABLE_MDNS | 128 #endif // ENABLE_MDNS |
129 }; | 129 }; |
130 | 130 |
131 class PrivetNotificationDelegate : public NotificationDelegate { | 131 class PrivetNotificationDelegate : public NotificationDelegate { |
132 public: | 132 public: |
133 explicit PrivetNotificationDelegate(content::BrowserContext* profile); | 133 explicit PrivetNotificationDelegate(content::BrowserContext* profile); |
134 | 134 |
135 // NotificationDelegate implementation. | 135 // NotificationDelegate implementation. |
136 std::string id() const override; | 136 std::string id() const override; |
137 void Display() override; | 137 void Display() override; |
138 void Error() override; | |
139 void Close(bool by_user) override; | 138 void Close(bool by_user) override; |
140 void Click() override; | 139 void Click() override; |
141 void ButtonClick(int button_index) override; | 140 void ButtonClick(int button_index) override; |
142 | 141 |
143 private: | 142 private: |
144 void OpenTab(const GURL& url); | 143 void OpenTab(const GURL& url); |
145 void DisableNotifications(); | 144 void DisableNotifications(); |
146 | 145 |
147 ~PrivetNotificationDelegate() override; | 146 ~PrivetNotificationDelegate() override; |
148 | 147 |
149 content::BrowserContext* profile_; | 148 content::BrowserContext* profile_; |
150 }; | 149 }; |
151 | 150 |
152 } // namespace local_discovery | 151 } // namespace local_discovery |
153 | 152 |
154 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ | 153 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ |
OLD | NEW |