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.

     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
     3 // found in the LICENSE file.
     5 #ifndef BASE_MESSAGE_PUMP_DEFAULT_H_
     6 #define BASE_MESSAGE_PUMP_DEFAULT_H_
     8 #include "base/message_pump.h"
     9 #include "base/time.h"
    10 #include "base/waitable_event.h"
    12 namespace base {
    14 class MessagePumpDefault : public MessagePump {
    15  public:
    16   MessagePumpDefault();
    17   ~MessagePumpDefault() {}
    19   // MessagePump methods:
    20   virtual void Run(Delegate* delegate);
    21   virtual void Quit();
    22   virtual void ScheduleWork();
    23   virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time);
    25  protected:
    26   // This flag is set to false when Run should return.
    27   bool keep_running_;
    29   // Used to sleep until there is more work to do.
    30   WaitableEvent event_;
    32   // The time at which we should call DoDelayedWork.
    33   TimeTicks delayed_work_time_;
    35  private:
    36   DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault);
    37 };
    39 }  // namespace base
    41 #endif  // BASE_MESSAGE_PUMP_DEFAULT_H_

mercurial