提交 a2bf3dc3 编写于 作者: J Jeff Brown 提交者: GitHub

Update to new way of passing application environment. (#3209)

上级 a3a13f4a
......@@ -35,7 +35,7 @@ ApplicationControllerImpl::ApplicationControllerImpl(
}
// TODO(abarth): The Dart code should end up with outgoing_services.
if (startup_info->outgoing_services.is_pending()) {
if (startup_info->outgoing_services) {
service_provider_bindings_.AddBinding(
this, std::move(startup_info->outgoing_services));
}
......@@ -43,10 +43,12 @@ ApplicationControllerImpl::ApplicationControllerImpl(
url_ = startup_info->url;
runtime_holder_.reset(new RuntimeHolder());
// TODO(abarth): The Dart code should end up with environment_services.
runtime_holder_->Init(modular::ServiceProviderPtr::Create(
std::move(startup_info->environment_services)),
std::move(bundle));
// TODO(abarth): The Dart code should end up with environment.
modular::ServiceProviderPtr environment_services;
modular::ApplicationEnvironmentPtr::Create(
std::move(startup_info->environment))
->GetServices(GetProxy(&environment_services));
runtime_holder_->Init(std::move(environment_services), std::move(bundle));
}
ApplicationControllerImpl::~ApplicationControllerImpl() = default;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册