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
|
|
|
|
2015-10-25 00:33:41 -07:00
|
|
|
#include <memory>
|
2016-10-05 12:22:03 -07:00
|
|
|
#include <vector>
|
2015-10-25 00:33:41 -07:00
|
|
|
|
2016-08-09 12:48:29 -07:00
|
|
|
#include "flutter/flow/layers/layer_tree.h"
|
2016-10-05 12:22:03 -07:00
|
|
|
#include "flutter/lib/ui/semantics/semantics_node.h"
|
2016-10-11 19:02:04 -07:00
|
|
|
#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-10-25 00:33:41 -07:00
|
|
|
|
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;
|
2017-11-02 02:57:29 -07:00
|
|
|
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;
|
2016-10-05 12:22:03 -07:00
|
|
|
virtual void UpdateSemantics(std::vector<SemanticsNode> update) = 0;
|
2017-09-11 15:58:48 -07:00
|
|
|
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);
|
2017-11-15 13:28:21 -08:00
|
|
|
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
|
|
|
};
|
|
|
|
|
|
2016-08-12 16:12:07 -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_
|