Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: chrome/browser/local_discovery/privet_notifications.h

Issue 22859018: Added image and button to privet notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@privet_notifications4
Patch Set: Updated to fix conflicts with master and remove binary files Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 content::BrowserContext* profile_; 114 content::BrowserContext* profile_;
115 NotificationUIManager* notification_manager_; 115 NotificationUIManager* notification_manager_;
116 scoped_ptr<PrivetDeviceLister> device_lister_; 116 scoped_ptr<PrivetDeviceLister> device_lister_;
117 scoped_refptr<ServiceDiscoveryHostClient> service_discovery_client_; 117 scoped_refptr<ServiceDiscoveryHostClient> service_discovery_client_;
118 scoped_ptr<PrivetNotificationsListener> privet_notifications_listener_; 118 scoped_ptr<PrivetNotificationsListener> privet_notifications_listener_;
119 }; 119 };
120 120
121 class PrivetNotificationDelegate : public NotificationDelegate { 121 class PrivetNotificationDelegate : public NotificationDelegate {
122 public: 122 public:
123 explicit PrivetNotificationDelegate(const std::string& device_id); 123 explicit PrivetNotificationDelegate(const std::string& device_id,
124 content::BrowserContext* profile);
124 125
125 // NotificationDelegate implementation. 126 // NotificationDelegate implementation.
126 virtual std::string id() const OVERRIDE; 127 virtual std::string id() const OVERRIDE;
127 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; 128 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE;
128 virtual void Display() OVERRIDE; 129 virtual void Display() OVERRIDE;
129 virtual void Error() OVERRIDE; 130 virtual void Error() OVERRIDE;
130 virtual void Close(bool by_user) OVERRIDE; 131 virtual void Close(bool by_user) OVERRIDE;
131 virtual void Click() OVERRIDE; 132 virtual void Click() OVERRIDE;
133 virtual void ButtonClick(int button_index) OVERRIDE;
134
132 private: 135 private:
136 void OpenTab(const GURL& url);
137
133 virtual ~PrivetNotificationDelegate(); 138 virtual ~PrivetNotificationDelegate();
134 139
135 std::string device_id_; 140 std::string device_id_;
141 content::BrowserContext* profile_;
136 }; 142 };
137 143
138 } // namespace local_discovery 144 } // namespace local_discovery
139 145
140 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_ 146 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_H_
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/local_discovery/privet_notifications.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698