1 // Copyright 2013 The Flutter Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef FLUTTER_RUNTIME_RUNTIME_DELEGATE_H_ 6 #define FLUTTER_RUNTIME_RUNTIME_DELEGATE_H_ 7 8 #include <memory> 9 #include <vector> 10 11 #include "flutter/flow/layers/layer_tree.h" 12 #include "flutter/lib/ui/semantics/semantics_node.h" 13 #include "flutter/lib/ui/text/font_collection.h" 14 #include "flutter/lib/ui/window/platform_message.h" 15 16 namespace flutter { 17 18 class RuntimeDelegate { 19 public: 20 virtual std::string DefaultRouteName() = 0; 21 22 virtual void ScheduleFrame(bool regenerate_layer_tree = true) = 0; 23 24 virtual void Render(std::unique_ptr<flutter::LayerTree> layer_tree) = 0; 25 26 virtual void HandlePlatformMessage(fml::RefPtr<PlatformMessage> message) = 0; 27 28 virtual FontCollection& GetFontCollection() = 0; 29 30 virtual void SetNeedsReportTimings(bool value) = 0; 31 32 protected: 33 virtual ~RuntimeDelegate() = default; 34 }; 35 36 } // namespace flutter 37 38 #endif // FLUTTER_RUNTIME_RUNTIME_DELEGATE_H_ 39