OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/metrics/user_metrics_recorder.h" | 5 #include "ash/metrics/user_metrics_recorder.h" |
6 | 6 |
7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
8 #include "ash/common/shelf/shelf_delegate.h" | 8 #include "ash/common/shelf/shelf_delegate.h" |
9 #include "ash/common/shelf/shelf_item_types.h" | 9 #include "ash/common/shelf/shelf_item_types.h" |
10 #include "ash/common/shelf/shelf_model.h" | 10 #include "ash/common/shelf/shelf_model.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 case wm::WINDOW_STATE_TYPE_DOCKED_MINIMIZED: | 60 case wm::WINDOW_STATE_TYPE_DOCKED_MINIMIZED: |
61 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_DOCKED; | 61 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_DOCKED; |
62 break; | 62 break; |
63 case wm::WINDOW_STATE_TYPE_DEFAULT: | 63 case wm::WINDOW_STATE_TYPE_DEFAULT: |
64 case wm::WINDOW_STATE_TYPE_NORMAL: | 64 case wm::WINDOW_STATE_TYPE_NORMAL: |
65 case wm::WINDOW_STATE_TYPE_MINIMIZED: | 65 case wm::WINDOW_STATE_TYPE_MINIMIZED: |
66 case wm::WINDOW_STATE_TYPE_INACTIVE: | 66 case wm::WINDOW_STATE_TYPE_INACTIVE: |
67 case wm::WINDOW_STATE_TYPE_END: | 67 case wm::WINDOW_STATE_TYPE_END: |
68 case wm::WINDOW_STATE_TYPE_AUTO_POSITIONED: | 68 case wm::WINDOW_STATE_TYPE_AUTO_POSITIONED: |
69 case wm::WINDOW_STATE_TYPE_PINNED: | 69 case wm::WINDOW_STATE_TYPE_PINNED: |
| 70 case wm::WINDOW_STATE_TYPE_TRUSTED_PINNED: |
70 // TODO: We probably want to recorde PINNED state. | 71 // TODO: We probably want to recorde PINNED state. |
71 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER; | 72 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER; |
72 break; | 73 break; |
73 } | 74 } |
74 } | 75 } |
75 return active_window_state_type; | 76 return active_window_state_type; |
76 } | 77 } |
77 | 78 |
78 // Returns true if kiosk mode is active. | 79 // Returns true if kiosk mode is active. |
79 bool IsKioskModeActive() { | 80 bool IsKioskModeActive() { |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 return IsUserActive() && !IsKioskModeActive(); | 632 return IsUserActive() && !IsKioskModeActive(); |
632 } | 633 } |
633 | 634 |
634 void UserMetricsRecorder::StartTimer() { | 635 void UserMetricsRecorder::StartTimer() { |
635 timer_.Start(FROM_HERE, | 636 timer_.Start(FROM_HERE, |
636 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), | 637 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), |
637 this, &UserMetricsRecorder::RecordPeriodicMetrics); | 638 this, &UserMetricsRecorder::RecordPeriodicMetrics); |
638 } | 639 } |
639 | 640 |
640 } // namespace ash | 641 } // namespace ash |
OLD | NEW |