summaryrefslogtreecommitdiffstats
path: root/base/test/signaling_task.h
blob: f7db5c2ad2a7e384427d6efcba688fd47fc2a4a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2011 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.

// A simple callback that you can use to wait for events on a thread.

#ifndef BASE_TEST_SIGNALING_TASK_H_
#define BASE_TEST_SIGNALING_TASK_H_
#pragma once

#include "base/task.h"

namespace base {

class WaitableEvent;

class SignalingTask : public Task {
 public:
  explicit SignalingTask(base::WaitableEvent* event);
  virtual ~SignalingTask();

  virtual void Run() OVERRIDE;

 private:
  base::WaitableEvent* event_;
  DISALLOW_COPY_AND_ASSIGN(SignalingTask);
};

}  // namespace base

#endif  // BASE_TEST_SIGNALING_TASK_H_