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

Side by Side Diff: ui/message_center/notification.h

Issue 687183004: Remove the OnError method from notification delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « content/renderer/notification_provider.cc ('k') | ui/message_center/notification_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 UI_MESSAGE_CENTER_NOTIFICATION_H_ 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_H_
6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_ 6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 const RichNotificationData& rich_notification_data() const { 178 const RichNotificationData& rich_notification_data() const {
179 return optional_fields_; 179 return optional_fields_;
180 } 180 }
181 181
182 // Set the priority to SYSTEM. The system priority user needs to call this 182 // Set the priority to SYSTEM. The system priority user needs to call this
183 // method explicitly, to avoid setting it accidentally. 183 // method explicitly, to avoid setting it accidentally.
184 void SetSystemPriority(); 184 void SetSystemPriority();
185 185
186 // Delegate actions. 186 // Delegate actions.
187 void Display() const { delegate()->Display(); } 187 void Display() const { delegate()->Display(); }
188 void Error() const { delegate()->Error(); }
189 bool HasClickedListener() const { return delegate()->HasClickedListener(); } 188 bool HasClickedListener() const { return delegate()->HasClickedListener(); }
190 void Click() const { delegate()->Click(); } 189 void Click() const { delegate()->Click(); }
191 void ButtonClick(int index) const { delegate()->ButtonClick(index); } 190 void ButtonClick(int index) const { delegate()->ButtonClick(index); }
192 void Close(bool by_user) const { delegate()->Close(by_user); } 191 void Close(bool by_user) const { delegate()->Close(by_user); }
193 192
194 // Helper method to create a simple system notification. |click_callback| 193 // Helper method to create a simple system notification. |click_callback|
195 // will be invoked when the notification is clicked. 194 // will be invoked when the notification is clicked.
196 static scoped_ptr<Notification> CreateSystemNotification( 195 static scoped_ptr<Notification> CreateSystemNotification(
197 const std::string& notification_id, 196 const std::string& notification_id,
198 const base::string16& title, 197 const base::string16& title,
(...skipping 27 matching lines...) Expand all
226 bool is_read_; // True if this has been seen in the message center. 225 bool is_read_; // True if this has been seen in the message center.
227 226
228 // A proxy object that allows access back to the JavaScript object that 227 // A proxy object that allows access back to the JavaScript object that
229 // represents the notification, for firing events. 228 // represents the notification, for firing events.
230 scoped_refptr<NotificationDelegate> delegate_; 229 scoped_refptr<NotificationDelegate> delegate_;
231 }; 230 };
232 231
233 } // namespace message_center 232 } // namespace message_center
234 233
235 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 234 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « content/renderer/notification_provider.cc ('k') | ui/message_center/notification_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698