| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ | 5 #ifndef CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ |
| 6 #define CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ | 6 #define CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // before killing the process. | 101 // before killing the process. |
| 102 bool use_thread_cpu_time_; | 102 bool use_thread_cpu_time_; |
| 103 | 103 |
| 104 // The number of consecutive acknowledgements that had a latency less than | 104 // The number of consecutive acknowledgements that had a latency less than |
| 105 // 50ms. | 105 // 50ms. |
| 106 int responsive_acknowledge_count_; | 106 int responsive_acknowledge_count_; |
| 107 | 107 |
| 108 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
| 109 void* watched_thread_handle_; | 109 void* watched_thread_handle_; |
| 110 base::TimeDelta arm_cpu_time_; | 110 base::TimeDelta arm_cpu_time_; |
| 111 |
| 112 // This measures the time that the system has been running, in units of 100 |
| 113 // ns. |
| 114 ULONGLONG arm_interrupt_time_; |
| 111 #endif | 115 #endif |
| 112 | 116 |
| 113 // Time after which it's assumed that the computer has been suspended since | 117 // Time after which it's assumed that the computer has been suspended since |
| 114 // the task was posted. | 118 // the task was posted. |
| 115 base::Time suspension_timeout_; | 119 base::Time suspension_timeout_; |
| 116 | 120 |
| 117 bool suspended_; | 121 bool suspended_; |
| 118 | 122 |
| 119 // This is the time the last check was sent. | 123 // This is the time the last check was sent. |
| 120 base::Time check_time_; | 124 base::Time check_time_; |
| 125 base::TimeTicks check_timeticks_; |
| 121 | 126 |
| 122 #if defined(OS_CHROMEOS) | 127 #if defined(OS_CHROMEOS) |
| 123 FILE* tty_file_; | 128 FILE* tty_file_; |
| 124 #endif | 129 #endif |
| 125 | 130 |
| 126 #if defined(USE_X11) | 131 #if defined(USE_X11) |
| 127 XDisplay* display_; | 132 XDisplay* display_; |
| 128 gfx::AcceleratedWidget window_; | 133 gfx::AcceleratedWidget window_; |
| 129 XAtom atom_; | 134 XAtom atom_; |
| 130 #endif | 135 #endif |
| 131 | 136 |
| 132 base::WeakPtrFactory<GpuWatchdogThread> weak_factory_; | 137 base::WeakPtrFactory<GpuWatchdogThread> weak_factory_; |
| 133 | 138 |
| 134 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread); | 139 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread); |
| 135 }; | 140 }; |
| 136 | 141 |
| 137 } // namespace content | 142 } // namespace content |
| 138 | 143 |
| 139 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ | 144 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ |
| OLD | NEW |