mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
We now respect the "route" field in Intents to load a route other than '/'. Also, use popRoute rather than events to indicate that the framework has asked us to go back.
51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
// 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.
|
|
|
|
module sky;
|
|
|
|
import "mojo/public/interfaces/application/service_provider.mojom";
|
|
import "mojo/public/interfaces/application/shell.mojom";
|
|
import "mojo/services/asset_bundle/interfaces/asset_bundle.mojom";
|
|
import "mojo/services/service_registry/interfaces/service_registry.mojom";
|
|
import "sky/services/engine/input_event.mojom";
|
|
import "sky/services/pointer/pointer.mojom";
|
|
|
|
struct ViewportMetrics {
|
|
int32 physical_width;
|
|
int32 physical_height;
|
|
float device_pixel_ratio = 1.0;
|
|
double padding_top;
|
|
double padding_right;
|
|
double padding_bottom;
|
|
double padding_left;
|
|
};
|
|
|
|
struct ServicesData {
|
|
mojo.Shell? shell;
|
|
mojo.ServiceRegistry? service_registry;
|
|
mojo.ServiceProvider? services_provided_by_embedder;
|
|
mojo.ServiceProvider&? services_provided_to_embedder;
|
|
};
|
|
|
|
[ServiceName="sky::SkyEngine"]
|
|
interface SkyEngine {
|
|
SetServices(ServicesData services);
|
|
|
|
OnActivityPaused();
|
|
OnActivityResumed();
|
|
|
|
OnViewportMetricsChanged(ViewportMetrics metrics);
|
|
OnPointerPacket(pointer.PointerPacket packet);
|
|
|
|
PushRoute(string route);
|
|
PopRoute();
|
|
|
|
RunFromFile(string main, string package_root);
|
|
RunFromPrecompiledSnapshot(string path);
|
|
RunFromSnapshot(string path);
|
|
RunFromBundle(string path);
|
|
|
|
RunFromAssetBundle(string url, mojo.asset_bundle.AssetBundle bundle);
|
|
};
|