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

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

Issue 15582004: Move NotificationDelegate into message_center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some more cosmetic fixes. Created 7 years, 7 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
« no previous file with comments | « ui/message_center/fake_message_center.cc ('k') | ui/message_center/message_center.gyp » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MESSAGE_CENTER_H_ 5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_H_
6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Basic operations of notification: add/remove/update. 84 // Basic operations of notification: add/remove/update.
85 85
86 // Adds a new notification. |id| is a unique identifier, used to update or 86 // Adds a new notification. |id| is a unique identifier, used to update or
87 // remove notifications. |title| and |meesage| describe the notification text. 87 // remove notifications. |title| and |meesage| describe the notification text.
88 // Use SetNotificationIcon, SetNotificationImage, or SetNotificationButtonIcon 88 // Use SetNotificationIcon, SetNotificationImage, or SetNotificationButtonIcon
89 // to set images. If |extension_id| is provided then 'Disable extension' will 89 // to set images. If |extension_id| is provided then 'Disable extension' will
90 // appear in a dropdown menu and the id will be used to disable notifications 90 // appear in a dropdown menu and the id will be used to disable notifications
91 // from the extension. Otherwise if |display_source| is provided, a menu item 91 // from the extension. Otherwise if |display_source| is provided, a menu item
92 // showing the source and allowing notifications from that source to be 92 // showing the source and allowing notifications from that source to be
93 // disabled will be shown. All actual disabling is handled by the Delegate. 93 // disabled will be shown. All actual disabling is handled by the Delegate.
94 virtual void AddNotification( 94 virtual void AddNotification(NotificationType type,
Jun Mukai 2013/05/22 23:08:30 Can we just receive message_center::Notification*
dewittj 2013/05/24 01:03:51 I was imagining that moving to pointers to Notific
95 NotificationType type, 95 const std::string& id,
96 const std::string& id, 96 const string16& title,
97 const string16& title, 97 const string16& message,
98 const string16& message, 98 const string16& display_source,
99 const string16& display_source, 99 const std::string& extension_id,
100 const std::string& extension_id, 100 const base::DictionaryValue* optional_fields,
101 const base::DictionaryValue* optional_fields) = 0; 101 NotificationDelegate* delegate) = 0;
102 102
103 // Updates an existing notification with id = old_id and set its id to new_id. 103 // Updates an existing notification with id = old_id and set its id to new_id.
104 // |optional_fields| can be NULL in case of no updates on those fields. 104 // |optional_fields| can be NULL in case of no updates on those fields.
105 virtual void UpdateNotification( 105 virtual void UpdateNotification(
106 const std::string& old_id, 106 const std::string& old_id,
107 const std::string& new_id, 107 const std::string& new_id,
108 const string16& title, 108 const string16& title,
109 const string16& message, 109 const string16& message,
110 const base::DictionaryValue* optional_fields) = 0; 110 const base::DictionaryValue* optional_fields) = 0;
111 111
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 MessageCenter(); 151 MessageCenter();
152 virtual ~MessageCenter(); 152 virtual ~MessageCenter();
153 153
154 private: 154 private:
155 DISALLOW_COPY_AND_ASSIGN(MessageCenter); 155 DISALLOW_COPY_AND_ASSIGN(MessageCenter);
156 }; 156 };
157 157
158 } // namespace message_center 158 } // namespace message_center
159 159
160 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ 160 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_
OLDNEW
« no previous file with comments | « ui/message_center/fake_message_center.cc ('k') | ui/message_center/message_center.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698