blob: 64dd573d9a90600d6c93fd0ec59a11d662075b3a [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/async-loop/cpp/loop.h>
#include <trace-provider/provider.h>
#include "intl_client_demo_view.h"
#include "lib/ui/base_view/cpp/view_provider_component.h"
#include "src/lib/fxl/command_line.h"
#include "src/lib/fxl/log_settings_command_line.h"
int main(int argc, const char** argv) {
async::Loop loop(&kAsyncLoopConfigAttachToThread);
trace::TraceProviderWithFdio trace_provider(loop.dispatcher());
auto command_line = fxl::CommandLineFromArgcArgv(argc, argv);
if (!fxl::SetLogSettingsFromCommandLine(command_line)) {
return 1;
}
FXL_LOG(INFO) << "Creating ViewProviderComponent";
scenic::ViewProviderComponent component(
[](scenic::ViewContext view_context) {
FXL_LOG(INFO) << "Calling ViewFactory";
auto view = std::make_unique<examples::IntlClientDemoView>(
std::move(view_context));
FXL_LOG(INFO) << "Constructed IntlClientDemoView";
return view;
},
&loop);
loop.Run();
FXL_LOG(INFO) << "Reached end of main";
return 0;
}