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

Side by Side Diff: base/run_loop.h

Issue 2564943002: Reland "Add thread checking to RunLoop, deprecate MessageLoopRunner. (patchset #4 id:20002 of https… (Closed)
Patch Set: Created 4 years 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 | base/run_loop.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) 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 BASE_RUN_LOOP_H_ 5 #ifndef BASE_RUN_LOOP_H_
6 #define BASE_RUN_LOOP_H_ 6 #define BASE_RUN_LOOP_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/threading/thread_checker.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 15
15 namespace base { 16 namespace base {
16 #if defined(OS_ANDROID) 17 #if defined(OS_ANDROID)
17 class MessagePumpForUI; 18 class MessagePumpForUI;
18 #endif 19 #endif
19 20
20 #if defined(OS_IOS) 21 #if defined(OS_IOS)
21 class MessagePumpUIApplication; 22 class MessagePumpUIApplication;
22 #endif 23 #endif
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 int run_depth_; 99 int run_depth_;
99 100
100 bool run_called_; 101 bool run_called_;
101 bool quit_called_; 102 bool quit_called_;
102 bool running_; 103 bool running_;
103 104
104 // Used to record that QuitWhenIdle() was called on the MessageLoop, meaning 105 // Used to record that QuitWhenIdle() was called on the MessageLoop, meaning
105 // that we should quit Run once it becomes idle. 106 // that we should quit Run once it becomes idle.
106 bool quit_when_idle_received_; 107 bool quit_when_idle_received_;
107 108
109 base::ThreadChecker thread_checker_;
110
108 // WeakPtrFactory for QuitClosure safety. 111 // WeakPtrFactory for QuitClosure safety.
109 base::WeakPtrFactory<RunLoop> weak_factory_; 112 base::WeakPtrFactory<RunLoop> weak_factory_;
110 113
111 DISALLOW_COPY_AND_ASSIGN(RunLoop); 114 DISALLOW_COPY_AND_ASSIGN(RunLoop);
112 }; 115 };
113 116
114 } // namespace base 117 } // namespace base
115 118
116 #endif // BASE_RUN_LOOP_H_ 119 #endif // BASE_RUN_LOOP_H_
OLDNEW
« no previous file with comments | « no previous file | base/run_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698