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

Unified Diff: ash/system/tray/tray_notification_view.cc

Issue 16046007: Shows the display info as a popup when a new display is connected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PopupDetailedView -> ShowNotificationView 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/tray_notification_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ash/system/tray/tray_notification_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698