OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ash/system/chromeos/session/tray_session_length_limit.h" | 5 #include "ash/system/chromeos/session/tray_session_length_limit.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/shelf/shelf_types.h" | 9 #include "ash/shelf/shelf_types.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "ui/message_center/notification.h" | 30 #include "ui/message_center/notification.h" |
31 #include "ui/views/border.h" | 31 #include "ui/views/border.h" |
32 #include "ui/views/controls/label.h" | 32 #include "ui/views/controls/label.h" |
33 #include "ui/views/layout/box_layout.h" | 33 #include "ui/views/layout/box_layout.h" |
34 #include "ui/views/layout/grid_layout.h" | 34 #include "ui/views/layout/grid_layout.h" |
35 #include "ui/views/view.h" | 35 #include "ui/views/view.h" |
36 | 36 |
37 using message_center::Notification; | 37 using message_center::Notification; |
38 | 38 |
39 namespace ash { | 39 namespace ash { |
40 namespace internal { | |
41 | |
42 namespace { | 40 namespace { |
43 | 41 |
44 // If the remaining session time falls below this threshold, the user should be | 42 // If the remaining session time falls below this threshold, the user should be |
45 // informed that the session is about to expire. | 43 // informed that the session is about to expire. |
46 const int kExpiringSoonThresholdInSeconds = 5 * 60; // 5 minutes. | 44 const int kExpiringSoonThresholdInSeconds = 5 * 60; // 5 minutes. |
47 | 45 |
48 // Color in which the remaining session time is normally shown. | 46 // Color in which the remaining session time is normally shown. |
49 const SkColor kRemainingTimeColor = SK_ColorWHITE; | 47 const SkColor kRemainingTimeColor = SK_ColorWHITE; |
50 // Color in which the remaining session time is shown when it is expiring soon. | 48 // Color in which the remaining session time is shown when it is expiring soon. |
51 const SkColor kRemainingTimeExpiringSoonColor = SK_ColorRED; | 49 const SkColor kRemainingTimeExpiringSoonColor = SK_ColorRED; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 // Update the tray view last so that it can check whether the notification | 379 // Update the tray view last so that it can check whether the notification |
382 // view is currently visible or not. | 380 // view is currently visible or not. |
383 if (tray_view_) | 381 if (tray_view_) |
384 tray_view_->Update(); | 382 tray_view_->Update(); |
385 } | 383 } |
386 | 384 |
387 bool TraySessionLengthLimit::IsTrayViewVisibleForTest() { | 385 bool TraySessionLengthLimit::IsTrayViewVisibleForTest() { |
388 return tray_view_ && tray_view_->visible(); | 386 return tray_view_ && tray_view_->visible(); |
389 } | 387 } |
390 | 388 |
391 } // namespace internal | |
392 } // namespace ash | 389 } // namespace ash |
OLD | NEW |