Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Side by Side Diff: content/gpu/gpu_watchdog_thread.h

Issue 836473003: Avoid gpu watchdog crash on timeout if X is un-responsive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/gpu/gpu_watchdog_thread.cc » ('j') | content/gpu/gpu_watchdog_thread.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 private: 56 private:
57 GpuWatchdogThread* watchdog_; 57 GpuWatchdogThread* watchdog_;
58 }; 58 };
59 59
60 ~GpuWatchdogThread() override; 60 ~GpuWatchdogThread() override;
61 61
62 void OnAcknowledge(); 62 void OnAcknowledge();
63 void OnCheck(bool after_suspend); 63 void OnCheck(bool after_suspend);
64 void DeliberatelyTerminateToRecoverFromHang(); 64 void DeliberatelyTerminateToRecoverFromHang();
65 #if defined(USE_X11)
66 void CheckXServerActive();
67 #endif
65 68
66 void OnAddPowerObserver(); 69 void OnAddPowerObserver();
67 70
68 // Implement PowerObserver. 71 // Implement PowerObserver.
69 void OnSuspend() override; 72 void OnSuspend() override;
70 void OnResume() override; 73 void OnResume() override;
71 74
72 #if defined(OS_WIN) 75 #if defined(OS_WIN)
73 base::TimeDelta GetWatchedThreadTime(); 76 base::TimeDelta GetWatchedThreadTime();
74 #endif 77 #endif
(...skipping 11 matching lines...) Expand all
86 // Time after which it's assumed that the computer has been suspended since 89 // Time after which it's assumed that the computer has been suspended since
87 // the task was posted. 90 // the task was posted.
88 base::Time suspension_timeout_; 91 base::Time suspension_timeout_;
89 92
90 bool suspended_; 93 bool suspended_;
91 94
92 #if defined(OS_CHROMEOS) 95 #if defined(OS_CHROMEOS)
93 FILE* tty_file_; 96 FILE* tty_file_;
94 #endif 97 #endif
95 98
99 #if defined(USE_X11)
100 bool x_server_active;
danakj 2015/01/06 00:29:19 member variables have _ suffix
101 #endif
102
96 base::WeakPtrFactory<GpuWatchdogThread> weak_factory_; 103 base::WeakPtrFactory<GpuWatchdogThread> weak_factory_;
97 104
98 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread); 105 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread);
99 }; 106 };
100 107
101 } // namespace content 108 } // namespace content
102 109
103 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ 110 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | content/gpu/gpu_watchdog_thread.cc » ('j') | content/gpu/gpu_watchdog_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698