2016-08-09 13:52:15 -07:00

35 lines
678 B
C++

// Copyright 2016 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 FLUTTER_GLU_THREAD_H_
#define FLUTTER_GLU_THREAD_H_
#include <memory>
#include "lib/ftl/tasks/task_runner.h"
namespace glue {
class Thread {
public:
Thread(std::string name);
~Thread();
bool Start();
const ftl::RefPtr<ftl::TaskRunner>& task_runner() { return task_runner_; }
private:
class ThreadImpl;
std::unique_ptr<ThreadImpl> impl_;
ftl::RefPtr<ftl::TaskRunner> task_runner_;
FTL_DISALLOW_COPY_AND_ASSIGN(Thread);
};
} // namespace glue
#endif // FLUTTER_GLU_THREAD_H_