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

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

Issue 6463013: Add support for base::Closure in the MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: rebased Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/jankometer.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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 25 matching lines...) Expand all
36 private: 36 private:
37 37
38 // An object of this type intercepts the reception and completion of all tasks 38 // An object of this type intercepts the reception and completion of all tasks
39 // on the watched thread and checks whether the watchdog is armed. 39 // on the watched thread and checks whether the watchdog is armed.
40 class GpuWatchdogTaskObserver : public MessageLoop::TaskObserver { 40 class GpuWatchdogTaskObserver : public MessageLoop::TaskObserver {
41 public: 41 public:
42 explicit GpuWatchdogTaskObserver(GpuWatchdogThread* watchdog); 42 explicit GpuWatchdogTaskObserver(GpuWatchdogThread* watchdog);
43 virtual ~GpuWatchdogTaskObserver(); 43 virtual ~GpuWatchdogTaskObserver();
44 44
45 // Implements MessageLoop::TaskObserver. 45 // Implements MessageLoop::TaskObserver.
46 virtual void WillProcessTask(const Task* task); 46 virtual void WillProcessTask(base::TimeTicks time_posted) OVERRIDE;
47 virtual void DidProcessTask(const Task* task); 47 virtual void DidProcessTask(base::TimeTicks time_posted) OVERRIDE;
48 48
49 private: 49 private:
50 GpuWatchdogThread* watchdog_; 50 GpuWatchdogThread* watchdog_;
51 }; 51 };
52 52
53 void OnAcknowledge(); 53 void OnAcknowledge();
54 void OnCheck(); 54 void OnCheck();
55 void DeliberatelyCrashingToRecoverFromHang(); 55 void DeliberatelyCrashingToRecoverFromHang();
56 void Disable(); 56 void Disable();
57 57
(...skipping 11 matching lines...) Expand all
69 69
70 base::Time arm_absolute_time_; 70 base::Time arm_absolute_time_;
71 71
72 typedef ScopedRunnableMethodFactory<GpuWatchdogThread> MethodFactory; 72 typedef ScopedRunnableMethodFactory<GpuWatchdogThread> MethodFactory;
73 scoped_ptr<MethodFactory> method_factory_; 73 scoped_ptr<MethodFactory> method_factory_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread); 75 DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread);
76 }; 76 };
77 77
78 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_ 78 #endif // CONTENT_GPU_GPU_WATCHDOG_THREAD_H_
OLDNEW
« no previous file with comments | « chrome/browser/jankometer.cc ('k') | content/gpu/gpu_watchdog_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698