diff options
author | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 06:05:24 +0000 |
---|---|---|
committer | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 06:05:24 +0000 |
commit | 67c0e08dc5d8c31f7c071f2f47e1dac4134b95ae (patch) | |
tree | 3e708e59c920eac8184d2833031872b2c74ec5c9 /ui/message_center/notification_list.cc | |
parent | 6cf042541fad316b89068f6274e03872bd71ad6a (diff) | |
download | chromium_src-67c0e08dc5d8c31f7c071f2f47e1dac4134b95ae.zip chromium_src-67c0e08dc5d8c31f7c071f2f47e1dac4134b95ae.tar.gz chromium_src-67c0e08dc5d8c31f7c071f2f47e1dac4134b95ae.tar.bz2 |
Move notification timers into a cross-platform location.
Popups stay visible for a short period of time, but that is
not a platform-dependent feature so we can move it out of
views/ code. Mac will then get the dismiss behavior
automatically. This does not cause the Mac version to pause
the timers on mouse hover, that will be done in a different
CL.
BUG=238245
Review URL: https://chromiumcodereview.appspot.com/16271009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/message_center/notification_list.cc')
-rw-r--r-- | ui/message_center/notification_list.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/message_center/notification_list.cc b/ui/message_center/notification_list.cc index 4191f7c..7b44da7 100644 --- a/ui/message_center/notification_list.cc +++ b/ui/message_center/notification_list.cc @@ -216,6 +216,17 @@ NotificationList::PopupNotifications NotificationList::GetPopupNotifications() { return result; } +Notification* NotificationList::GetPopup(const std::string& id) { + PopupNotifications popups = GetPopupNotifications(); + for (PopupNotifications::iterator iter = popups.begin(); iter != popups.end(); + ++iter) { + if ((*iter)->id() == id) + return *iter; + } + + return NULL; +} + void NotificationList::MarkPopupsAsShown(int priority) { PopupNotifications popups = GetPopupNotifications(); for (PopupNotifications::iterator iter = popups.begin(); |