// Copyright 2016 The Chromium 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_CONTENT_HANDLER_APP_H_ #define FLUTTER_CONTENT_HANDLER_APP_H_ #include #include #include "apps/modular/lib/app/application_context.h" #include "apps/modular/services/application/application_runner.fidl.h" #include "flutter/content_handler/application_controller_impl.h" #include "flutter/content_handler/content_handler_thread.h" #include "lib/ftl/macros.h" namespace flutter_runner { class App : public modular::ApplicationRunner { public: App(); ~App(); // |modular::ApplicationRunner| implementation: void StartApplication(modular::ApplicationPackagePtr application, modular::ApplicationStartupInfoPtr startup_info, fidl::InterfaceRequest controller) override; void Destroy(ApplicationControllerImpl* controller); private: std::unique_ptr context_; std::unique_ptr gpu_thread_; std::unique_ptr io_thread_; fidl::BindingSet runner_bindings_; std::unordered_map> controllers_; FTL_DISALLOW_COPY_AND_ASSIGN(App); }; } // namespace flutter_runner #endif // FLUTTER_CONTENT_HANDLER_APP_H_