| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 scoped_refptr<PrivetTrafficDetector> traffic_detector_; | 126 scoped_refptr<PrivetTrafficDetector> traffic_detector_; |
| 127 #endif // ENABLE_MDNS | 127 #endif // ENABLE_MDNS |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 class PrivetNotificationDelegate : public NotificationDelegate { | 130 class PrivetNotificationDelegate : public NotificationDelegate { |
| 131 public: | 131 public: |
| 132 explicit PrivetNotificationDelegate(content::BrowserContext* profile); | 132 explicit PrivetNotificationDelegate(content::BrowserContext* profile); |
| 133 | 133 |
| 134 // NotificationDelegate implementation. | 134 // NotificationDelegate implementation. |
| 135 virtual std::string id() const OVERRIDE; | 135 virtual std::string id() const OVERRIDE; |
| 136 virtual content::WebContents* GetWebContents() const OVERRIDE; | |
| 137 virtual void Display() OVERRIDE; | 136 virtual void Display() OVERRIDE; |
| 138 virtual void Error() OVERRIDE; | 137 virtual void Error() OVERRIDE; |
| 139 virtual void Close(bool by_user) OVERRIDE; | 138 virtual void Close(bool by_user) OVERRIDE; |
| 140 virtual void Click() OVERRIDE; | 139 virtual void Click() OVERRIDE; |
| 141 virtual void ButtonClick(int button_index) OVERRIDE; | 140 virtual 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 virtual ~PrivetNotificationDelegate(); | 146 virtual ~PrivetNotificationDelegate(); |
| 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 |