Files
engine/runtime/runtime_delegate.h
T

37 lines
1.1 KiB
C++
Raw Normal View History

2015-05-19 14:20:04 -07:00
// Copyright 2015 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.
2016-08-13 00:18:58 -07:00
#ifndef FLUTTER_RUNTIME_RUNTIME_DELEGATE_H_
#define FLUTTER_RUNTIME_RUNTIME_DELEGATE_H_
2015-05-19 14:20:04 -07:00
#include <memory>
#include <vector>
2016-08-09 12:48:29 -07:00
#include "flutter/flow/layers/layer_tree.h"
#include "flutter/lib/ui/semantics/semantics_node.h"
#include "flutter/lib/ui/window/platform_message.h"
2017-10-19 01:20:38 -07:00
#include "third_party/dart/runtime/include/dart_api.h"
2015-05-19 14:20:04 -07:00
namespace blink {
2016-08-13 00:18:58 -07:00
class RuntimeDelegate {
2015-05-19 14:20:04 -07:00
public:
2017-06-06 10:59:41 +02:00
virtual std::string DefaultRouteName() = 0;
virtual void ScheduleFrame(bool regenerate_layer_tree = true) = 0;
2016-01-12 22:18:58 -08:00
virtual void Render(std::unique_ptr<flow::LayerTree> layer_tree) = 0;
virtual void UpdateSemantics(std::vector<SemanticsNode> update) = 0;
virtual void HandlePlatformMessage(fxl::RefPtr<PlatformMessage> message) = 0;
2015-05-19 14:20:04 -07:00
2016-08-13 00:18:58 -07:00
virtual void DidCreateMainIsolate(Dart_Isolate isolate);
virtual void DidCreateSecondaryIsolate(Dart_Isolate isolate);
virtual void DidShutdownMainIsolate();
2015-05-26 16:01:25 -07:00
2015-05-19 14:20:04 -07:00
protected:
2016-08-13 00:18:58 -07:00
virtual ~RuntimeDelegate();
2015-05-19 14:20:04 -07:00
};
} // namespace blink
2015-05-19 14:20:04 -07:00
2016-08-13 00:18:58 -07:00
#endif // FLUTTER_RUNTIME_RUNTIME_DELEGATE_H_