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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 scoped_refptr<PrivetTrafficDetector> traffic_detector_; | 127 scoped_refptr<PrivetTrafficDetector> traffic_detector_; |
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 Error() override; | |
138 void ButtonClick(int button_index) override; | 137 void ButtonClick(int button_index) override; |
139 | 138 |
140 private: | 139 private: |
141 void OpenTab(const GURL& url); | 140 void OpenTab(const GURL& url); |
142 void DisableNotifications(); | 141 void DisableNotifications(); |
143 | 142 |
144 ~PrivetNotificationDelegate() override; | 143 ~PrivetNotificationDelegate() override; |
145 | 144 |
146 content::BrowserContext* profile_; | 145 content::BrowserContext* profile_; |
147 }; | 146 }; |
148 | 147 |
149 } // namespace local_discovery | 148 } // namespace local_discovery |
150 | 149 |
151 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ | 150 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ |
OLD | NEW |