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
3 // found in the LICENSE file.
5 #ifndef BASE_MESSAGE_PUMP_DEFAULT_H_
6 #define BASE_MESSAGE_PUMP_DEFAULT_H_
9 #include "base/message_pump.h"
10 #include "base/time.h"
11 #include "base/synchronization/waitable_event.h"
15 class MessagePumpDefault
: public MessagePump
{
19 // MessagePump methods:
20 virtual void Run(Delegate
* delegate
) OVERRIDE
;
21 virtual void Quit() OVERRIDE
;
22 virtual void ScheduleWork() OVERRIDE
;
23 virtual void ScheduleDelayedWork(const TimeTicks
& delayed_work_time
) OVERRIDE
;
26 virtual ~MessagePumpDefault() {}
29 // This flag is set to false when Run should return.
32 // Used to sleep until there is more work to do.
35 // The time at which we should call DoDelayedWork.
36 TimeTicks delayed_work_time_
;
38 DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault
);
43 #endif // BASE_MESSAGE_PUMP_DEFAULT_H_