flutter_flutter/common/task_runners.h
Chinmay Garde 58e84c8bf0
Re-land "Support multiple shells in a single process. (#4932)" (#4998)
* Re-land "Support multiple shells in a single process. (#4932)"

This reverts commit 723c7d01439da4261bc836075fb55651ce9e7f03.
2018-04-13 13:48:15 -07:00

47 lines
1.2 KiB
C++

// Copyright 2017 The Flutter 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_COMMON_TASK_RUNNERS_H_
#define FLUTTER_COMMON_TASK_RUNNERS_H_
#include <string>
#include "lib/fxl/macros.h"
#include "lib/fxl/tasks/task_runner.h"
namespace blink {
class TaskRunners {
public:
TaskRunners(std::string label,
fxl::RefPtr<fxl::TaskRunner> platform,
fxl::RefPtr<fxl::TaskRunner> gpu,
fxl::RefPtr<fxl::TaskRunner> ui,
fxl::RefPtr<fxl::TaskRunner> io);
~TaskRunners();
const std::string& GetLabel() const;
fxl::RefPtr<fxl::TaskRunner> GetPlatformTaskRunner() const;
fxl::RefPtr<fxl::TaskRunner> GetUITaskRunner() const;
fxl::RefPtr<fxl::TaskRunner> GetIOTaskRunner() const;
fxl::RefPtr<fxl::TaskRunner> GetGPUTaskRunner() const;
bool IsValid() const;
private:
const std::string label_;
fxl::RefPtr<fxl::TaskRunner> platform_;
fxl::RefPtr<fxl::TaskRunner> gpu_;
fxl::RefPtr<fxl::TaskRunner> ui_;
fxl::RefPtr<fxl::TaskRunner> io_;
};
} // namespace blink
#endif // FLUTTER_COMMON_TASK_RUNNERS_H_