| 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/metrics/pointer_metrics_recorder.h" | 7 #include "ash/common/metrics/pointer_metrics_recorder.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/shelf/shelf_delegate.h" | 9 #include "ash/common/shelf/shelf_delegate.h" |
| 10 #include "ash/common/shelf/shelf_item_types.h" | 10 #include "ash/common/shelf/shelf_item_types.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 case wm::WINDOW_STATE_TYPE_PINNED: | 66 case wm::WINDOW_STATE_TYPE_PINNED: |
| 67 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_PINNED; | 67 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_PINNED; |
| 68 break; | 68 break; |
| 69 case wm::WINDOW_STATE_TYPE_TRUSTED_PINNED: | 69 case wm::WINDOW_STATE_TYPE_TRUSTED_PINNED: |
| 70 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_TRUSTED_PINNED; | 70 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_TRUSTED_PINNED; |
| 71 break; | 71 break; |
| 72 case wm::WINDOW_STATE_TYPE_DEFAULT: | 72 case wm::WINDOW_STATE_TYPE_DEFAULT: |
| 73 case wm::WINDOW_STATE_TYPE_NORMAL: | 73 case wm::WINDOW_STATE_TYPE_NORMAL: |
| 74 case wm::WINDOW_STATE_TYPE_MINIMIZED: | 74 case wm::WINDOW_STATE_TYPE_MINIMIZED: |
| 75 case wm::WINDOW_STATE_TYPE_INACTIVE: | 75 case wm::WINDOW_STATE_TYPE_INACTIVE: |
| 76 case wm::WINDOW_STATE_TYPE_PREVIOUS: |
| 76 case wm::WINDOW_STATE_TYPE_END: | 77 case wm::WINDOW_STATE_TYPE_END: |
| 77 case wm::WINDOW_STATE_TYPE_AUTO_POSITIONED: | 78 case wm::WINDOW_STATE_TYPE_AUTO_POSITIONED: |
| 78 // TODO: We probably want to recorde PINNED state. | 79 // TODO: We probably want to recorde PINNED state. |
| 79 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER; | 80 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER; |
| 80 break; | 81 break; |
| 81 } | 82 } |
| 82 } | 83 } |
| 83 return active_window_state_type; | 84 return active_window_state_type; |
| 84 } | 85 } |
| 85 | 86 |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 return IsUserActive() && !IsKioskModeActive() && !IsArcKioskModeActive(); | 647 return IsUserActive() && !IsKioskModeActive() && !IsArcKioskModeActive(); |
| 647 } | 648 } |
| 648 | 649 |
| 649 void UserMetricsRecorder::StartTimer() { | 650 void UserMetricsRecorder::StartTimer() { |
| 650 timer_.Start(FROM_HERE, | 651 timer_.Start(FROM_HERE, |
| 651 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), | 652 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), |
| 652 this, &UserMetricsRecorder::RecordPeriodicMetrics); | 653 this, &UserMetricsRecorder::RecordPeriodicMetrics); |
| 653 } | 654 } |
| 654 | 655 |
| 655 } // namespace ash | 656 } // namespace ash |
| OLD | NEW |