| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CHROMEOS_NOTIFICATIONS_SYSTEM_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_SYSTEM_NOTIFICATION_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_SYSTEM_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_SYSTEM_NOTIFICATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // The system notification object handles the display of a system notification | 23 // The system notification object handles the display of a system notification |
| 24 | 24 |
| 25 class SystemNotification { | 25 class SystemNotification { |
| 26 public: | 26 public: |
| 27 // The profile is the current user profile. The id is any string used | 27 // The profile is the current user profile. The id is any string used |
| 28 // to uniquely identify this notification. The title is the title of | 28 // to uniquely identify this notification. The title is the title of |
| 29 // the message to be displayed. On creation, the message is hidden. | 29 // the message to be displayed. On creation, the message is hidden. |
| 30 SystemNotification(Profile* profile, std::string id, int icon_resource_id, | 30 SystemNotification(Profile* profile, std::string id, int icon_resource_id, |
| 31 string16 title); | 31 string16 title); |
| 32 | 32 |
| 33 ~SystemNotification(); | 33 virtual ~SystemNotification(); |
| 34 | 34 |
| 35 // Show will show or update the message for this notification | 35 // Show will show or update the message for this notification |
| 36 // on a transition to urgent, the notification will be shown if it was | 36 // on a transition to urgent, the notification will be shown if it was |
| 37 // previously hidden or minimized by the user. | 37 // previously hidden or minimized by the user. |
| 38 void Show(const string16& message, bool urgent); | 38 void Show(const string16& message, bool urgent, bool sticky); |
| 39 | 39 |
| 40 // Hide will dismiss the notification, if the notification is already | 40 // Hide will dismiss the notification, if the notification is already |
| 41 // hidden it does nothing | 41 // hidden it does nothing |
| 42 void Hide(); | 42 void Hide(); |
| 43 | 43 |
| 44 // Current visibility state for this notification. | 44 // Current visibility state for this notification. |
| 45 bool visible() const { return visible_; } | 45 bool visible() const { return visible_; } |
| 46 | 46 |
| 47 // Current urgent state for this notification. | 47 // Current urgent state for this notification. |
| 48 bool urgent() const { return urgent_; } | 48 bool urgent() const { return urgent_; } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 70 string16 title_; | 70 string16 title_; |
| 71 bool visible_; | 71 bool visible_; |
| 72 bool urgent_; | 72 bool urgent_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(SystemNotification); | 74 DISALLOW_COPY_AND_ASSIGN(SystemNotification); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace chromeos | 77 } // namespace chromeos |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_SYSTEM_NOTIFICATION_H_ | 79 #endif // CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_SYSTEM_NOTIFICATION_H_ |
| OLD | NEW |