~alinuxninja/nginx-edge/trunk

« back to all changes in this revision

Viewing changes to debian/modules/ngx_pagespeed/psol/include/third_party/chromium/src/base/message_loop/message_pump_default.h

  • Committer: Vivian
  • Date: 2015-12-04 18:20:11 UTC
  • Revision ID: git-v1:a36f2bc32e884f7473b3a47040e5411306144d7d
* Do not extract psol.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
4
 
 
5
 
#ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_
6
 
#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_
7
 
 
8
 
#include "base/message_loop/message_pump.h"
9
 
#include "base/synchronization/waitable_event.h"
10
 
#include "base/time/time.h"
11
 
 
12
 
namespace base {
13
 
 
14
 
class MessagePumpDefault : public MessagePump {
15
 
 public:
16
 
  MessagePumpDefault();
17
 
  virtual ~MessagePumpDefault();
18
 
 
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;
24
 
 
25
 
 private:
26
 
  // This flag is set to false when Run should return.
27
 
  bool keep_running_;
28
 
 
29
 
  // Used to sleep until there is more work to do.
30
 
  WaitableEvent event_;
31
 
 
32
 
  // The time at which we should call DoDelayedWork.
33
 
  TimeTicks delayed_work_time_;
34
 
 
35
 
  DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault);
36
 
};
37
 
 
38
 
}  // namespace base
39
 
 
40
 
#endif  // BASE__MESSAGE_LOOPMESSAGE_PUMP_DEFAULT_H_