diff --git a/engine/flutter/shell/platform/ohos/platform_task_runner.cc b/engine/flutter/shell/platform/ohos/platform_task_runner.cc new file mode 100644 index 0000000000000000000000000000000000000000..a321dd6958201efb6412c3b2127ae990838dd07c --- /dev/null +++ b/engine/flutter/shell/platform/ohos/platform_task_runner.cc @@ -0,0 +1,18 @@ +// Copyright 2013 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. +// 2021.10.08 platform task runner adapt ohos. +// Copyright (c) 2021 Huawei Device Co., Ltd. All rights reserved. + +#include "flutter/shell/platform/ohos/platform_task_runner.h" + +#include "flutter/shell/platform/ohos/platform_task_runner_adapter.h" + +namespace flutter { + +fml::RefPtr PlatformTaskRunner::CurrentTaskRunner() +{ + return PlatformTaskRunnerAdapter::CurrentTaskRunner(); +} + +} // namespace flutter \ No newline at end of file diff --git a/engine/flutter/shell/platform/ohos/platform_task_runner.h b/engine/flutter/shell/platform/ohos/platform_task_runner.h new file mode 100644 index 0000000000000000000000000000000000000000..6166126e38a4b7bc0672b79452ce7dd9a3efb3fe --- /dev/null +++ b/engine/flutter/shell/platform/ohos/platform_task_runner.h @@ -0,0 +1,22 @@ +// Copyright 2013 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. +// 2021.10.08 platform task runner adapt ohos. +// Copyright (c) 2021 Huawei Device Co., Ltd. All rights reserved. + +#ifndef FLUTTER_SHELL_PLATFORM_OHOS_PLATFORM_TASK_RUNNER_H +#define FLUTTER_SHELL_PLATFORM_OHOS_PLATFORM_TASK_RUNNER_H + +#include "flutter/fml/message_loop_impl.h" +#include "flutter/fml/message_loop_task_queues.h" + +namespace flutter { + +class PlatformTaskRunner { +public: + static fml::RefPtr CurrentTaskRunner(); +}; + +} // namespace flutter + +#endif // FLUTTER_SHELL_PLATFORM_OHOS_PLATFORM_TASK_RUNNER_H \ No newline at end of file