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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 case wm::WINDOW_STATE_TYPE_DOCKED_MINIMIZED: | 59 case wm::WINDOW_STATE_TYPE_DOCKED_MINIMIZED: |
60 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_DOCKED; | 60 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_DOCKED; |
61 break; | 61 break; |
62 case wm::WINDOW_STATE_TYPE_DEFAULT: | 62 case wm::WINDOW_STATE_TYPE_DEFAULT: |
63 case wm::WINDOW_STATE_TYPE_NORMAL: | 63 case wm::WINDOW_STATE_TYPE_NORMAL: |
64 case wm::WINDOW_STATE_TYPE_MINIMIZED: | 64 case wm::WINDOW_STATE_TYPE_MINIMIZED: |
65 case wm::WINDOW_STATE_TYPE_INACTIVE: | 65 case wm::WINDOW_STATE_TYPE_INACTIVE: |
66 case wm::WINDOW_STATE_TYPE_END: | 66 case wm::WINDOW_STATE_TYPE_END: |
67 case wm::WINDOW_STATE_TYPE_AUTO_POSITIONED: | 67 case wm::WINDOW_STATE_TYPE_AUTO_POSITIONED: |
68 case wm::WINDOW_STATE_TYPE_PINNED: | 68 case wm::WINDOW_STATE_TYPE_PINNED: |
| 69 case wm::WINDOW_STATE_TYPE_TRUSTED_PINNED: |
69 // TODO: We probably want to recorde PINNED state. | 70 // TODO: We probably want to recorde PINNED state. |
70 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER; | 71 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER; |
71 break; | 72 break; |
72 } | 73 } |
73 } | 74 } |
74 return active_window_state_type; | 75 return active_window_state_type; |
75 } | 76 } |
76 | 77 |
77 // Returns true if kiosk mode is active. | 78 // Returns true if kiosk mode is active. |
78 bool IsKioskModeActive() { | 79 bool IsKioskModeActive() { |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 return IsUserActive() && !IsKioskModeActive(); | 628 return IsUserActive() && !IsKioskModeActive(); |
628 } | 629 } |
629 | 630 |
630 void UserMetricsRecorder::StartTimer() { | 631 void UserMetricsRecorder::StartTimer() { |
631 timer_.Start(FROM_HERE, | 632 timer_.Start(FROM_HERE, |
632 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), | 633 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), |
633 this, &UserMetricsRecorder::RecordPeriodicMetrics); | 634 this, &UserMetricsRecorder::RecordPeriodicMetrics); |
634 } | 635 } |
635 | 636 |
636 } // namespace ash | 637 } // namespace ash |
OLD | NEW |