| Index: components/framelet/common/framelet.mojom
|
| diff --git a/components/framelet/common/framelet.mojom b/components/framelet/common/framelet.mojom
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b1339772c8bc936414370e55c5db44aa23a4b95d
|
| --- /dev/null
|
| +++ b/components/framelet/common/framelet.mojom
|
| @@ -0,0 +1,86 @@
|
| +// 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 framelet.mojom;
|
| +
|
| +import "components/mus/public/interfaces/input_events.mojom";
|
| +import "components/mus/public/interfaces/surface_id.mojom";
|
| +import "ui/mojo/geometry/geometry.mojom";
|
| +
|
| +enum ResourceUsageLevel {
|
| + LOW = 0,
|
| + MEDIUM,
|
| + HIGH,
|
| + CRITICAL,
|
| + MAX_VALUE
|
| +};
|
| +
|
| +enum FocusType {
|
| + NONE,
|
| + FORWARD,
|
| + BACKWARD,
|
| + UP,
|
| + DOWN,
|
| + LEFT,
|
| + RIGHT,
|
| + MOUSE,
|
| + PAGE,
|
| + LAST
|
| +};
|
| +
|
| +struct SurfaceId {
|
| + uint32 local;
|
| + uint32 id_namespace;
|
| +};
|
| +
|
| +enum ValueType {
|
| + BOOLEAN,
|
| + INTEGER,
|
| + STRING
|
| +};
|
| +
|
| +struct StringValue {
|
| + string value;
|
| +};
|
| +
|
| +struct IntegerValue {
|
| + uint32 value;
|
| +};
|
| +
|
| +struct BooleanValue {
|
| + bool value;
|
| +};
|
| +
|
| +struct Value {
|
| + ValueType type;
|
| + BooleanValue? boolean_value;
|
| + IntegerValue? integer_value;
|
| + StringValue? string_value;
|
| +};
|
| +
|
| +interface Framelet {
|
| + Attach(FrameletClient client, map<string, Value> params);
|
| +
|
| + Destroy();
|
| +
|
| + ForwardInput(array<uint8> event);
|
| +
|
| + Resize(mojo.Size new_size);
|
| +
|
| + SetFocus(bool focused, FocusType focus_type);
|
| +
|
| + SetVisible(bool visible);
|
| +};
|
| +
|
| +interface FrameletClient {
|
| + ReportMemoryUsage(ResourceUsageLevel usage_level);
|
| +
|
| + SetChildFrameSurface(mus.mojom.SurfaceId surface_id,
|
| + mojo.Size frame_size,
|
| + float scale_factor);
|
| +};
|
| +
|
| +interface FrameletFactory {
|
| + Create(Framelet& framelet, map<string, Value> params);
|
| +};
|
|
|