OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "base/message_pump_default.h" | 5 #include "base/message_pump_default.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/scoped_nsautorelease_pool.h" | 8 #include "base/scoped_nsautorelease_pool.h" |
9 | 9 |
| 10 using base::Time; |
| 11 using base::TimeDelta; |
| 12 |
10 namespace base { | 13 namespace base { |
11 | 14 |
12 MessagePumpDefault::MessagePumpDefault() | 15 MessagePumpDefault::MessagePumpDefault() |
13 : keep_running_(true), | 16 : keep_running_(true), |
14 event_(false, false) { | 17 event_(false, false) { |
15 } | 18 } |
16 | 19 |
17 void MessagePumpDefault::Run(Delegate* delegate) { | 20 void MessagePumpDefault::Run(Delegate* delegate) { |
18 DCHECK(keep_running_) << "Quit must have been called outside of Run!"; | 21 DCHECK(keep_running_) << "Quit must have been called outside of Run!"; |
19 | 22 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 72 |
70 void MessagePumpDefault::ScheduleDelayedWork(const Time& delayed_work_time) { | 73 void MessagePumpDefault::ScheduleDelayedWork(const Time& delayed_work_time) { |
71 // We know that we can't be blocked on Wait right now since this method can | 74 // We know that we can't be blocked on Wait right now since this method can |
72 // only be called on the same thread as Run, so we only need to update our | 75 // only be called on the same thread as Run, so we only need to update our |
73 // record of how long to sleep when we do sleep. | 76 // record of how long to sleep when we do sleep. |
74 delayed_work_time_ = delayed_work_time; | 77 delayed_work_time_ = delayed_work_time; |
75 } | 78 } |
76 | 79 |
77 } // namespace base | 80 } // namespace base |
78 | 81 |
OLD | NEW |