| Index: base/threading/sequenced_task_runner_impl.h
|
| ===================================================================
|
| --- base/threading/sequenced_task_runner_impl.h (revision 0)
|
| +++ base/threading/sequenced_task_runner_impl.h (revision 0)
|
| @@ -0,0 +1,56 @@
|
| +// Copyright (c) 2012 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.
|
| +
|
| +#ifndef BASE_THREADING_SEQUENCED_TASK_RUNNER_IMPL_H_
|
| +#define BASE_THREADING_SEQUENCED_TASK_RUNNER_IMPL_H_
|
| +#pragma once
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "base/sequenced_task_runner.h"
|
| +#include "base/threading/sequenced_worker_pool.h"
|
| +
|
| +namespace base {
|
| +
|
| +// Note that this class is RefCountedThreadSafe (inherited from TaskRunner).
|
| +class BASE_EXPORT SequencedTaskRunnerImpl
|
| + : public base::SequencedTaskRunner,
|
| + public base::SupportsWeakPtr<SequencedTaskRunnerImpl> {
|
| + public:
|
| + SequencedTaskRunnerImpl(scoped_refptr<SequencedWorkerPool> pool,
|
| + SequencedWorkerPool::SequenceToken token);
|
| +
|
| + // TaskRunner implementation
|
| + virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
|
| + const Closure& task,
|
| + int64 delay_ms) OVERRIDE;
|
| + virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
|
| + const Closure& task,
|
| + TimeDelta delay) OVERRIDE;
|
| + virtual bool RunsTasksOnCurrentThread() const OVERRIDE;
|
| +
|
| + // SequencedTaskRunner implementation
|
| + virtual bool PostNonNestableDelayedTask(
|
| + const tracked_objects::Location& from_here,
|
| + const Closure& task,
|
| + int64 delay_ms) OVERRIDE;
|
| + virtual bool PostNonNestableDelayedTask(
|
| + const tracked_objects::Location& from_here,
|
| + const Closure& task,
|
| + base::TimeDelta delay) OVERRIDE;
|
| +
|
| + private:
|
| + ~SequencedTaskRunnerImpl();
|
| +
|
| + scoped_refptr<SequencedWorkerPool> pool_;
|
| +
|
| + SequencedWorkerPool::SequenceToken token_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SequencedTaskRunnerImpl);
|
| +};
|
| +
|
| +} // namespace base
|
| +
|
| +#endif // BASE_THREADING_SEQUENCED_TASK_RUNNER_IMPL_H_
|
|
|
| Property changes on: base/threading/sequenced_task_runner_impl.h
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|