| // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_ |
| #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_ |
| #include "base/base_export.h" |
| #include "base/message_loop/message_pump.h" |
| #include "base/synchronization/waitable_event.h" |
| #include "base/time/time.h" |
| #include "build/build_config.h" |
| class BASE_EXPORT MessagePumpDefault : public MessagePump { |
| ~MessagePumpDefault() override; |
| void Run(Delegate* delegate) override; |
| void ScheduleWork() override; |
| void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override; |
| void SetTimerSlack(TimerSlack timer_slack) override; |
| // This flag is set to false when Run should return. |
| // Used to sleep until there is more work to do. |
| // The time at which we should call DoDelayedWork. |
| TimeTicks delayed_work_time_; |
| DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault); |
| #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_ |