| Index: ash/system/tray/tray_notification_view.cc
|
| diff --git a/ash/system/tray/tray_notification_view.cc b/ash/system/tray/tray_notification_view.cc
|
| index bb6cee8191b4abba33fd4fffeeb3037a46bf3d43..aa4b1d1a8ac755fcd5602590ca8dce4f3c73aa21 100644
|
| --- a/ash/system/tray/tray_notification_view.cc
|
| +++ b/ash/system/tray/tray_notification_view.cc
|
| @@ -108,6 +108,25 @@ void TrayNotificationView::UpdateViewAndImage(views::View* new_contents,
|
| SchedulePaint();
|
| }
|
|
|
| +void TrayNotificationView::StartAutoCloseTimer(int seconds) {
|
| + autoclose_.Stop();
|
| + autoclose_delay_ = seconds;
|
| + if (autoclose_delay_) {
|
| + autoclose_.Start(FROM_HERE,
|
| + base::TimeDelta::FromSeconds(autoclose_delay_),
|
| + this, &TrayNotificationView::HandleClose);
|
| + }
|
| +}
|
| +
|
| +void TrayNotificationView::StopAutoCloseTimer() {
|
| + autoclose_.Stop();
|
| +}
|
| +
|
| +void TrayNotificationView::RestartAutoCloseTimer() {
|
| + if (autoclose_delay_)
|
| + StartAutoCloseTimer(autoclose_delay_);
|
| +}
|
| +
|
| void TrayNotificationView::ButtonPressed(views::Button* sender,
|
| const ui::Event& event) {
|
| HandleClose();
|
|
|