main.cc 741 字节
Newer Older
1
// Copyright 2018 The Fuchsia Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
#include <trace-provider/provider.h>
6
#include <cstdlib>
7

8
#include "application_runner.h"
G
George Kulakowski 已提交
9
#include "lib/fsl/tasks/message_loop.h"
10

11
int main(int argc, char const* argv[]) {
G
George Kulakowski 已提交
12
  fsl::MessageLoop loop;
13

14
  trace::TraceProvider provider(loop.async());
15 16 17 18 19 20 21 22
  FXL_DCHECK(provider.is_valid()) << "Trace provider must be valid.";

  FXL_LOG(INFO) << "Flutter application services initialized.";
  flutter::ApplicationRunner runner([&loop]() {
    loop.PostQuitTask();
    FXL_LOG(INFO) << "Flutter application services terminated. Good bye...";
  });

A
Adam Barth 已提交
23
  loop.Run();
24 25

  return EXIT_SUCCESS;
26
}