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 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" | |
14 #include "build/build_config.h" | 13 #include "build/build_config.h" |
15 | 14 |
16 namespace base { | 15 namespace base { |
17 #if defined(OS_ANDROID) | 16 #if defined(OS_ANDROID) |
18 class MessagePumpForUI; | 17 class MessagePumpForUI; |
19 #endif | 18 #endif |
20 | 19 |
21 #if defined(OS_IOS) | 20 #if defined(OS_IOS) |
22 class MessagePumpUIApplication; | 21 class MessagePumpUIApplication; |
23 #endif | 22 #endif |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 int run_depth_; | 98 int run_depth_; |
100 | 99 |
101 bool run_called_; | 100 bool run_called_; |
102 bool quit_called_; | 101 bool quit_called_; |
103 bool running_; | 102 bool running_; |
104 | 103 |
105 // Used to record that QuitWhenIdle() was called on the MessageLoop, meaning | 104 // Used to record that QuitWhenIdle() was called on the MessageLoop, meaning |
106 // that we should quit Run once it becomes idle. | 105 // that we should quit Run once it becomes idle. |
107 bool quit_when_idle_received_; | 106 bool quit_when_idle_received_; |
108 | 107 |
109 base::ThreadChecker thread_checker_; | |
110 | |
111 // WeakPtrFactory for QuitClosure safety. | 108 // WeakPtrFactory for QuitClosure safety. |
112 base::WeakPtrFactory<RunLoop> weak_factory_; | 109 base::WeakPtrFactory<RunLoop> weak_factory_; |
113 | 110 |
114 DISALLOW_COPY_AND_ASSIGN(RunLoop); | 111 DISALLOW_COPY_AND_ASSIGN(RunLoop); |
115 }; | 112 }; |
116 | 113 |
117 } // namespace base | 114 } // namespace base |
118 | 115 |
119 #endif // BASE_RUN_LOOP_H_ | 116 #endif // BASE_RUN_LOOP_H_ |
OLD | NEW |