ipc/chromium/src/base/message_pump_default.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
michael@0 2 // Use of this source code is governed by a BSD-style license that can be
michael@0 3 // found in the LICENSE file.
michael@0 4
michael@0 5 #ifndef BASE_MESSAGE_PUMP_DEFAULT_H_
michael@0 6 #define BASE_MESSAGE_PUMP_DEFAULT_H_
michael@0 7
michael@0 8 #include "base/message_pump.h"
michael@0 9 #include "base/time.h"
michael@0 10 #include "base/waitable_event.h"
michael@0 11
michael@0 12 namespace base {
michael@0 13
michael@0 14 class MessagePumpDefault : public MessagePump {
michael@0 15 public:
michael@0 16 MessagePumpDefault();
michael@0 17 ~MessagePumpDefault() {}
michael@0 18
michael@0 19 // MessagePump methods:
michael@0 20 virtual void Run(Delegate* delegate);
michael@0 21 virtual void Quit();
michael@0 22 virtual void ScheduleWork();
michael@0 23 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time);
michael@0 24
michael@0 25 protected:
michael@0 26 // This flag is set to false when Run should return.
michael@0 27 bool keep_running_;
michael@0 28
michael@0 29 // Used to sleep until there is more work to do.
michael@0 30 WaitableEvent event_;
michael@0 31
michael@0 32 // The time at which we should call DoDelayedWork.
michael@0 33 TimeTicks delayed_work_time_;
michael@0 34
michael@0 35 private:
michael@0 36 DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault);
michael@0 37 };
michael@0 38
michael@0 39 } // namespace base
michael@0 40
michael@0 41 #endif // BASE_MESSAGE_PUMP_DEFAULT_H_

mercurial