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

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

Issue 23075012: Update NetworkStateNotifier to use message_center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Track deafult_network and reset did_show_out_of_credits on any change Created 7 years, 4 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 | Annotate | Revision Log
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void SetSystemPriority(); 160 void SetSystemPriority();
161 161
162 // Delegate actions. 162 // Delegate actions.
163 void Display() const { delegate()->Display(); } 163 void Display() const { delegate()->Display(); }
164 void Error() const { delegate()->Error(); } 164 void Error() const { delegate()->Error(); }
165 bool HasClickedListener() const { return delegate()->HasClickedListener(); } 165 bool HasClickedListener() const { return delegate()->HasClickedListener(); }
166 void Click() const { delegate()->Click(); } 166 void Click() const { delegate()->Click(); }
167 void ButtonClick(int index) const { delegate()->ButtonClick(index); } 167 void ButtonClick(int index) const { delegate()->ButtonClick(index); }
168 void Close(bool by_user) const { delegate()->Close(by_user); } 168 void Close(bool by_user) const { delegate()->Close(by_user); }
169 169
170 // Helper method to create a simple System notification. |click_callback|
171 // will be invoked when the notification is clicked.
172 static scoped_ptr<Notification> CreateSystemNotification(
173 const std::string& notification_id,
174 const base::string16& title,
175 const base::string16& message,
176 const gfx::Image& icon,
177 const base::Closure& click_callback);
178
170 protected: 179 protected:
171 // The type of notification we'd like displayed. 180 // The type of notification we'd like displayed.
172 NotificationType type_; 181 NotificationType type_;
173 182
174 std::string id_; 183 std::string id_;
175 string16 title_; 184 string16 title_;
176 string16 message_; 185 string16 message_;
177 186
178 // Image data for the associated icon, used by Ash when available. 187 // Image data for the associated icon, used by Ash when available.
179 gfx::Image icon_; 188 gfx::Image icon_;
(...skipping 11 matching lines...) Expand all
191 bool is_expanded_; // True if this has been expanded in the message center. 200 bool is_expanded_; // True if this has been expanded in the message center.
192 201
193 // A proxy object that allows access back to the JavaScript object that 202 // A proxy object that allows access back to the JavaScript object that
194 // represents the notification, for firing events. 203 // represents the notification, for firing events.
195 scoped_refptr<NotificationDelegate> delegate_; 204 scoped_refptr<NotificationDelegate> delegate_;
196 }; 205 };
197 206
198 } // namespace message_center 207 } // namespace message_center
199 208
200 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 209 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system/ash_system_tray_delegate.cc ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698