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

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

Issue 8572047: base::Bind() conversion for content/common/gpu and content/gpu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scoped_ptr<base::WPF> -> base::WPF Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/gpu/gpu_watchdog_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 11 #include "base/message_loop.h"
11 #include "base/task.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "content/common/gpu/gpu_watchdog.h" 14 #include "content/common/gpu/gpu_watchdog.h"
15 15
16 // A thread that intermitently sends tasks to a group of watched message loops 16 // A thread that intermitently sends tasks to a group of watched message loops
17 // and deliberately crashes if one of them does not respond after a timeout. 17 // and deliberately crashes if one of them does not respond after a timeout.
18 class GpuWatchdogThread : public base::Thread, 18 class GpuWatchdogThread : public base::Thread,
19 public GpuWatchdog, 19 public GpuWatchdog,
20 public base::RefCountedThreadSafe<GpuWatchdogThread> { 20 public base::RefCountedThreadSafe<GpuWatchdogThread> {
21 public: 21 public:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 volatile bool armed_; 62 volatile bool armed_;
63 GpuWatchdogTaskObserver task_observer_; 63 GpuWatchdogTaskObserver task_observer_;
64 64
65 #if defined(OS_WIN) 65 #if defined(OS_WIN)
66 void* watched_thread_handle_; 66 void* watched_thread_handle_;
67 int64 arm_cpu_time_; 67 int64 arm_cpu_time_;
68 #endif 68 #endif
69 69
70 base::Time arm_absolute_time_; 70 base::Time arm_absolute_time_;
71 71
72 typedef ScopedRunnableMethodFactory<GpuWatchdogThread> MethodFactory; 72 base::WeakPtrFactory<GpuWatchdogThread> weak_factory_;
73 scoped_ptr<MethodFactory> method_factory_;
74 73
75 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread); 74 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread);
76 }; 75 };
77 76
78 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ 77 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/gpu/gpu_watchdog_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698