| Index: mojo/dart/packages/mojo_services/lib/mojo/window_manager.mojom.dart
|
| diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_factory.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/window_manager.mojom.dart
|
| similarity index 54%
|
| copy from mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_factory.mojom.dart
|
| copy to mojo/dart/packages/mojo_services/lib/mojo/window_manager.mojom.dart
|
| index 35dd6559aff4167bc8bb5923a5bb4f7947832368..8ad38af2f8b3cba72c9f07b046b4d655e91cf4b5 100644
|
| --- a/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_factory.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/window_manager.mojom.dart
|
| @@ -2,28 +2,28 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -library sample_factory_mojom;
|
| +library window_manager_mojom;
|
|
|
| import 'dart:async';
|
|
|
| import 'package:mojo/bindings.dart' as bindings;
|
| import 'package:mojo/core.dart' as core;
|
| -import 'package:_mojo_for_test_only/imported/sample_import.mojom.dart' as sample_import_mojom;
|
| +import 'package:mojo_services/mojo/input_events.mojom.dart' as input_events_mojom;
|
| +import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom;
|
|
|
|
|
|
|
| -class Request extends bindings.Struct {
|
| +class _WindowManagerEmbedParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(32, 0)
|
| ];
|
| - int x = 0;
|
| - core.MojoMessagePipeEndpoint pipe = null;
|
| - List<core.MojoMessagePipeEndpoint> morePipes = null;
|
| - Object obj = null;
|
| + String url = null;
|
| + Object services = null;
|
| + Object exposedServices = null;
|
|
|
| - Request() : super(kVersions.last.size);
|
| + _WindowManagerEmbedParams() : super(kVersions.last.size);
|
|
|
| - static Request deserialize(bindings.Message message) {
|
| + static _WindowManagerEmbedParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -32,11 +32,11 @@ class Request extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static Request decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerEmbedParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - Request result = new Request();
|
| + _WindowManagerEmbedParams result = new _WindowManagerEmbedParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -58,19 +58,15 @@ class Request extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.x = decoder0.decodeInt32(8);
|
| + result.url = decoder0.decodeString(8, false);
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.pipe = decoder0.decodeMessagePipeHandle(12, true);
|
| + result.services = decoder0.decodeInterfaceRequest(16, true, service_provider_mojom.ServiceProviderStub.newFromEndpoint);
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.morePipes = decoder0.decodeMessagePipeHandleArray(16, bindings.kArrayNullable, bindings.kUnspecifiedArrayLength);
|
| - }
|
| - if (mainDataHeader.version >= 0) {
|
| -
|
| - result.obj = decoder0.decodeServiceInterface(24, true, sample_import_mojom.ImportedInterfaceProxy.newFromEndpoint);
|
| + result.exposedServices = decoder0.decodeServiceInterface(20, true, service_provider_mojom.ServiceProviderProxy.newFromEndpoint);
|
| }
|
| return result;
|
| }
|
| @@ -78,21 +74,18 @@ class Request extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInt32(x, 8);
|
| -
|
| - encoder0.encodeMessagePipeHandle(pipe, 12, true);
|
| + encoder0.encodeString(url, 8, false);
|
|
|
| - encoder0.encodeMessagePipeHandleArray(morePipes, 16, bindings.kArrayNullable, bindings.kUnspecifiedArrayLength);
|
| + encoder0.encodeInterfaceRequest(services, 16, true);
|
|
|
| - encoder0.encodeInterface(obj, 24, true);
|
| + encoder0.encodeInterface(exposedServices, 20, true);
|
| }
|
|
|
| String toString() {
|
| - return "Request("
|
| - "x: $x" ", "
|
| - "pipe: $pipe" ", "
|
| - "morePipes: $morePipes" ", "
|
| - "obj: $obj" ")";
|
| + return "_WindowManagerEmbedParams("
|
| + "url: $url" ", "
|
| + "services: $services" ", "
|
| + "exposedServices: $exposedServices" ")";
|
| }
|
|
|
| Map toJson() {
|
| @@ -102,16 +95,15 @@ class Request extends bindings.Struct {
|
| }
|
|
|
|
|
| -class Response extends bindings.Struct {
|
| +class _WindowManagerSetCaptureParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - int x = 0;
|
| - core.MojoMessagePipeEndpoint pipe = null;
|
| + int viewId = 0;
|
|
|
| - Response() : super(kVersions.last.size);
|
| + _WindowManagerSetCaptureParams() : super(kVersions.last.size);
|
|
|
| - static Response deserialize(bindings.Message message) {
|
| + static _WindowManagerSetCaptureParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -120,11 +112,11 @@ class Response extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static Response decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerSetCaptureParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - Response result = new Response();
|
| + _WindowManagerSetCaptureParams result = new _WindowManagerSetCaptureParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -146,11 +138,7 @@ class Response extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.x = decoder0.decodeInt32(8);
|
| - }
|
| - if (mainDataHeader.version >= 0) {
|
| -
|
| - result.pipe = decoder0.decodeMessagePipeHandle(12, true);
|
| + result.viewId = decoder0.decodeUint32(8);
|
| }
|
| return result;
|
| }
|
| @@ -158,33 +146,31 @@ class Response extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInt32(x, 8);
|
| -
|
| - encoder0.encodeMessagePipeHandle(pipe, 12, true);
|
| + encoder0.encodeUint32(viewId, 8);
|
| }
|
|
|
| String toString() {
|
| - return "Response("
|
| - "x: $x" ", "
|
| - "pipe: $pipe" ")";
|
| + return "_WindowManagerSetCaptureParams("
|
| + "viewId: $viewId" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["viewId"] = viewId;
|
| + return map;
|
| }
|
| }
|
|
|
|
|
| -class _NamedObjectSetNameParams extends bindings.Struct {
|
| +class WindowManagerSetCaptureResponseParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - String name = null;
|
| + bool success = false;
|
|
|
| - _NamedObjectSetNameParams() : super(kVersions.last.size);
|
| + WindowManagerSetCaptureResponseParams() : super(kVersions.last.size);
|
|
|
| - static _NamedObjectSetNameParams deserialize(bindings.Message message) {
|
| + static WindowManagerSetCaptureResponseParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -193,11 +179,11 @@ class _NamedObjectSetNameParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static _NamedObjectSetNameParams decode(bindings.Decoder decoder0) {
|
| + static WindowManagerSetCaptureResponseParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - _NamedObjectSetNameParams result = new _NamedObjectSetNameParams();
|
| + WindowManagerSetCaptureResponseParams result = new WindowManagerSetCaptureResponseParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -219,7 +205,7 @@ class _NamedObjectSetNameParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.name = decoder0.decodeString(8, false);
|
| + result.success = decoder0.decodeBool(8, 0);
|
| }
|
| return result;
|
| }
|
| @@ -227,89 +213,31 @@ class _NamedObjectSetNameParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(name, 8, false);
|
| + encoder0.encodeBool(success, 8, 0);
|
| }
|
|
|
| String toString() {
|
| - return "_NamedObjectSetNameParams("
|
| - "name: $name" ")";
|
| + return "WindowManagerSetCaptureResponseParams("
|
| + "success: $success" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["name"] = name;
|
| + map["success"] = success;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class _NamedObjectGetNameParams extends bindings.Struct {
|
| - static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(8, 0)
|
| - ];
|
| -
|
| - _NamedObjectGetNameParams() : super(kVersions.last.size);
|
| -
|
| - static _NamedObjectGetNameParams deserialize(bindings.Message message) {
|
| - var decoder = new bindings.Decoder(message);
|
| - var result = decode(decoder);
|
| - if (decoder.excessHandles != null) {
|
| - decoder.excessHandles.forEach((h) => h.close());
|
| - }
|
| - return result;
|
| - }
|
| -
|
| - static _NamedObjectGetNameParams decode(bindings.Decoder decoder0) {
|
| - if (decoder0 == null) {
|
| - return null;
|
| - }
|
| - _NamedObjectGetNameParams result = new _NamedObjectGetNameParams();
|
| -
|
| - var mainDataHeader = decoder0.decodeStructDataHeader();
|
| - if (mainDataHeader.version <= kVersions.last.version) {
|
| - // Scan in reverse order to optimize for more recent versions.
|
| - for (int i = kVersions.length - 1; i >= 0; --i) {
|
| - if (mainDataHeader.version >= kVersions[i].version) {
|
| - if (mainDataHeader.size == kVersions[i].size) {
|
| - // Found a match.
|
| - break;
|
| - }
|
| - throw new bindings.MojoCodecError(
|
| - 'Header size doesn\'t correspond to known version size.');
|
| - }
|
| - }
|
| - } else if (mainDataHeader.size < kVersions.last.size) {
|
| - throw new bindings.MojoCodecError(
|
| - 'Message newer than the last known version cannot be shorter than '
|
| - 'required by the last known version.');
|
| - }
|
| - return result;
|
| - }
|
| -
|
| - void encode(bindings.Encoder encoder) {
|
| - encoder.getStructEncoderAtOffset(kVersions.last);
|
| - }
|
| -
|
| - String toString() {
|
| - return "_NamedObjectGetNameParams("")";
|
| - }
|
| -
|
| - Map toJson() {
|
| - Map map = new Map();
|
| - return map;
|
| - }
|
| -}
|
| -
|
| -
|
| -class NamedObjectGetNameResponseParams extends bindings.Struct {
|
| +class _WindowManagerFocusWindowParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - String name = null;
|
| + int viewId = 0;
|
|
|
| - NamedObjectGetNameResponseParams() : super(kVersions.last.size);
|
| + _WindowManagerFocusWindowParams() : super(kVersions.last.size);
|
|
|
| - static NamedObjectGetNameResponseParams deserialize(bindings.Message message) {
|
| + static _WindowManagerFocusWindowParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -318,11 +246,11 @@ class NamedObjectGetNameResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static NamedObjectGetNameResponseParams decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerFocusWindowParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - NamedObjectGetNameResponseParams result = new NamedObjectGetNameResponseParams();
|
| + _WindowManagerFocusWindowParams result = new _WindowManagerFocusWindowParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -344,7 +272,7 @@ class NamedObjectGetNameResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.name = decoder0.decodeString(8, false);
|
| + result.viewId = decoder0.decodeUint32(8);
|
| }
|
| return result;
|
| }
|
| @@ -352,107 +280,31 @@ class NamedObjectGetNameResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(name, 8, false);
|
| + encoder0.encodeUint32(viewId, 8);
|
| }
|
|
|
| String toString() {
|
| - return "NamedObjectGetNameResponseParams("
|
| - "name: $name" ")";
|
| + return "_WindowManagerFocusWindowParams("
|
| + "viewId: $viewId" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["name"] = name;
|
| + map["viewId"] = viewId;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class _FactoryDoStuffParams extends bindings.Struct {
|
| +class WindowManagerFocusWindowResponseParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(24, 0)
|
| - ];
|
| - Request request = null;
|
| - core.MojoMessagePipeEndpoint pipe = null;
|
| -
|
| - _FactoryDoStuffParams() : super(kVersions.last.size);
|
| -
|
| - static _FactoryDoStuffParams deserialize(bindings.Message message) {
|
| - var decoder = new bindings.Decoder(message);
|
| - var result = decode(decoder);
|
| - if (decoder.excessHandles != null) {
|
| - decoder.excessHandles.forEach((h) => h.close());
|
| - }
|
| - return result;
|
| - }
|
| -
|
| - static _FactoryDoStuffParams decode(bindings.Decoder decoder0) {
|
| - if (decoder0 == null) {
|
| - return null;
|
| - }
|
| - _FactoryDoStuffParams result = new _FactoryDoStuffParams();
|
| -
|
| - var mainDataHeader = decoder0.decodeStructDataHeader();
|
| - if (mainDataHeader.version <= kVersions.last.version) {
|
| - // Scan in reverse order to optimize for more recent versions.
|
| - for (int i = kVersions.length - 1; i >= 0; --i) {
|
| - if (mainDataHeader.version >= kVersions[i].version) {
|
| - if (mainDataHeader.size == kVersions[i].size) {
|
| - // Found a match.
|
| - break;
|
| - }
|
| - throw new bindings.MojoCodecError(
|
| - 'Header size doesn\'t correspond to known version size.');
|
| - }
|
| - }
|
| - } else if (mainDataHeader.size < kVersions.last.size) {
|
| - throw new bindings.MojoCodecError(
|
| - 'Message newer than the last known version cannot be shorter than '
|
| - 'required by the last known version.');
|
| - }
|
| - if (mainDataHeader.version >= 0) {
|
| -
|
| - var decoder1 = decoder0.decodePointer(8, false);
|
| - result.request = Request.decode(decoder1);
|
| - }
|
| - if (mainDataHeader.version >= 0) {
|
| -
|
| - result.pipe = decoder0.decodeMessagePipeHandle(16, true);
|
| - }
|
| - return result;
|
| - }
|
| -
|
| - void encode(bindings.Encoder encoder) {
|
| - var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| -
|
| - encoder0.encodeStruct(request, 8, false);
|
| -
|
| - encoder0.encodeMessagePipeHandle(pipe, 16, true);
|
| - }
|
| -
|
| - String toString() {
|
| - return "_FactoryDoStuffParams("
|
| - "request: $request" ", "
|
| - "pipe: $pipe" ")";
|
| - }
|
| -
|
| - Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| - }
|
| -}
|
| -
|
| -
|
| -class FactoryDoStuffResponseParams extends bindings.Struct {
|
| - static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(24, 0)
|
| + const bindings.StructDataHeader(16, 0)
|
| ];
|
| - Response response = null;
|
| - String text = null;
|
| + bool success = false;
|
|
|
| - FactoryDoStuffResponseParams() : super(kVersions.last.size);
|
| + WindowManagerFocusWindowResponseParams() : super(kVersions.last.size);
|
|
|
| - static FactoryDoStuffResponseParams deserialize(bindings.Message message) {
|
| + static WindowManagerFocusWindowResponseParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -461,11 +313,11 @@ class FactoryDoStuffResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static FactoryDoStuffResponseParams decode(bindings.Decoder decoder0) {
|
| + static WindowManagerFocusWindowResponseParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - FactoryDoStuffResponseParams result = new FactoryDoStuffResponseParams();
|
| + WindowManagerFocusWindowResponseParams result = new WindowManagerFocusWindowResponseParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -487,12 +339,7 @@ class FactoryDoStuffResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - var decoder1 = decoder0.decodePointer(8, false);
|
| - result.response = Response.decode(decoder1);
|
| - }
|
| - if (mainDataHeader.version >= 0) {
|
| -
|
| - result.text = decoder0.decodeString(16, false);
|
| + result.success = decoder0.decodeBool(8, 0);
|
| }
|
| return result;
|
| }
|
| @@ -500,33 +347,31 @@ class FactoryDoStuffResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeStruct(response, 8, false);
|
| -
|
| - encoder0.encodeString(text, 16, false);
|
| + encoder0.encodeBool(success, 8, 0);
|
| }
|
|
|
| String toString() {
|
| - return "FactoryDoStuffResponseParams("
|
| - "response: $response" ", "
|
| - "text: $text" ")";
|
| + return "WindowManagerFocusWindowResponseParams("
|
| + "success: $success" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["success"] = success;
|
| + return map;
|
| }
|
| }
|
|
|
|
|
| -class _FactoryDoStuff2Params extends bindings.Struct {
|
| +class _WindowManagerActivateWindowParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - core.MojoDataPipeConsumer pipe = null;
|
| + int viewId = 0;
|
|
|
| - _FactoryDoStuff2Params() : super(kVersions.last.size);
|
| + _WindowManagerActivateWindowParams() : super(kVersions.last.size);
|
|
|
| - static _FactoryDoStuff2Params deserialize(bindings.Message message) {
|
| + static _WindowManagerActivateWindowParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -535,11 +380,11 @@ class _FactoryDoStuff2Params extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static _FactoryDoStuff2Params decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerActivateWindowParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - _FactoryDoStuff2Params result = new _FactoryDoStuff2Params();
|
| + _WindowManagerActivateWindowParams result = new _WindowManagerActivateWindowParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -561,7 +406,7 @@ class _FactoryDoStuff2Params extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.pipe = decoder0.decodeConsumerHandle(8, false);
|
| + result.viewId = decoder0.decodeUint32(8);
|
| }
|
| return result;
|
| }
|
| @@ -569,30 +414,31 @@ class _FactoryDoStuff2Params extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeConsumerHandle(pipe, 8, false);
|
| + encoder0.encodeUint32(viewId, 8);
|
| }
|
|
|
| String toString() {
|
| - return "_FactoryDoStuff2Params("
|
| - "pipe: $pipe" ")";
|
| + return "_WindowManagerActivateWindowParams("
|
| + "viewId: $viewId" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["viewId"] = viewId;
|
| + return map;
|
| }
|
| }
|
|
|
|
|
| -class FactoryDoStuff2ResponseParams extends bindings.Struct {
|
| +class WindowManagerActivateWindowResponseParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - String text = null;
|
| + bool success = false;
|
|
|
| - FactoryDoStuff2ResponseParams() : super(kVersions.last.size);
|
| + WindowManagerActivateWindowResponseParams() : super(kVersions.last.size);
|
|
|
| - static FactoryDoStuff2ResponseParams deserialize(bindings.Message message) {
|
| + static WindowManagerActivateWindowResponseParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -601,11 +447,11 @@ class FactoryDoStuff2ResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static FactoryDoStuff2ResponseParams decode(bindings.Decoder decoder0) {
|
| + static WindowManagerActivateWindowResponseParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - FactoryDoStuff2ResponseParams result = new FactoryDoStuff2ResponseParams();
|
| + WindowManagerActivateWindowResponseParams result = new WindowManagerActivateWindowResponseParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -627,7 +473,7 @@ class FactoryDoStuff2ResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.text = decoder0.decodeString(8, false);
|
| + result.success = decoder0.decodeBool(8, 0);
|
| }
|
| return result;
|
| }
|
| @@ -635,31 +481,31 @@ class FactoryDoStuff2ResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(text, 8, false);
|
| + encoder0.encodeBool(success, 8, 0);
|
| }
|
|
|
| String toString() {
|
| - return "FactoryDoStuff2ResponseParams("
|
| - "text: $text" ")";
|
| + return "WindowManagerActivateWindowResponseParams("
|
| + "success: $success" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["text"] = text;
|
| + map["success"] = success;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class _FactoryCreateNamedObjectParams extends bindings.Struct {
|
| +class _WindowManagerGetFocusedAndActiveViewsParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - Object obj = null;
|
| + Object observer = null;
|
|
|
| - _FactoryCreateNamedObjectParams() : super(kVersions.last.size);
|
| + _WindowManagerGetFocusedAndActiveViewsParams() : super(kVersions.last.size);
|
|
|
| - static _FactoryCreateNamedObjectParams deserialize(bindings.Message message) {
|
| + static _WindowManagerGetFocusedAndActiveViewsParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -668,11 +514,11 @@ class _FactoryCreateNamedObjectParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static _FactoryCreateNamedObjectParams decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerGetFocusedAndActiveViewsParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - _FactoryCreateNamedObjectParams result = new _FactoryCreateNamedObjectParams();
|
| + _WindowManagerGetFocusedAndActiveViewsParams result = new _WindowManagerGetFocusedAndActiveViewsParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -694,7 +540,7 @@ class _FactoryCreateNamedObjectParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.obj = decoder0.decodeInterfaceRequest(8, false, NamedObjectStub.newFromEndpoint);
|
| + result.observer = decoder0.decodeServiceInterface(8, true, WindowManagerObserverProxy.newFromEndpoint);
|
| }
|
| return result;
|
| }
|
| @@ -702,12 +548,12 @@ class _FactoryCreateNamedObjectParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInterfaceRequest(obj, 8, false);
|
| + encoder0.encodeInterface(observer, 8, true);
|
| }
|
|
|
| String toString() {
|
| - return "_FactoryCreateNamedObjectParams("
|
| - "obj: $obj" ")";
|
| + return "_WindowManagerGetFocusedAndActiveViewsParams("
|
| + "observer: $observer" ")";
|
| }
|
|
|
| Map toJson() {
|
| @@ -717,15 +563,17 @@ class _FactoryCreateNamedObjectParams extends bindings.Struct {
|
| }
|
|
|
|
|
| -class _FactoryRequestImportedInterfaceParams extends bindings.Struct {
|
| +class WindowManagerGetFocusedAndActiveViewsResponseParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(16, 0)
|
| + const bindings.StructDataHeader(24, 0)
|
| ];
|
| - Object obj = null;
|
| + int captureViewId = 0;
|
| + int focusedViewId = 0;
|
| + int activeViewId = 0;
|
|
|
| - _FactoryRequestImportedInterfaceParams() : super(kVersions.last.size);
|
| + WindowManagerGetFocusedAndActiveViewsResponseParams() : super(kVersions.last.size);
|
|
|
| - static _FactoryRequestImportedInterfaceParams deserialize(bindings.Message message) {
|
| + static WindowManagerGetFocusedAndActiveViewsResponseParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -734,11 +582,11 @@ class _FactoryRequestImportedInterfaceParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static _FactoryRequestImportedInterfaceParams decode(bindings.Decoder decoder0) {
|
| + static WindowManagerGetFocusedAndActiveViewsResponseParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - _FactoryRequestImportedInterfaceParams result = new _FactoryRequestImportedInterfaceParams();
|
| + WindowManagerGetFocusedAndActiveViewsResponseParams result = new WindowManagerGetFocusedAndActiveViewsResponseParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -760,7 +608,15 @@ class _FactoryRequestImportedInterfaceParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.obj = decoder0.decodeInterfaceRequest(8, false, sample_import_mojom.ImportedInterfaceStub.newFromEndpoint);
|
| + result.captureViewId = decoder0.decodeUint32(8);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.focusedViewId = decoder0.decodeUint32(12);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.activeViewId = decoder0.decodeUint32(16);
|
| }
|
| return result;
|
| }
|
| @@ -768,30 +624,39 @@ class _FactoryRequestImportedInterfaceParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInterfaceRequest(obj, 8, false);
|
| + encoder0.encodeUint32(captureViewId, 8);
|
| +
|
| + encoder0.encodeUint32(focusedViewId, 12);
|
| +
|
| + encoder0.encodeUint32(activeViewId, 16);
|
| }
|
|
|
| String toString() {
|
| - return "_FactoryRequestImportedInterfaceParams("
|
| - "obj: $obj" ")";
|
| + return "WindowManagerGetFocusedAndActiveViewsResponseParams("
|
| + "captureViewId: $captureViewId" ", "
|
| + "focusedViewId: $focusedViewId" ", "
|
| + "activeViewId: $activeViewId" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["captureViewId"] = captureViewId;
|
| + map["focusedViewId"] = focusedViewId;
|
| + map["activeViewId"] = activeViewId;
|
| + return map;
|
| }
|
| }
|
|
|
|
|
| -class FactoryRequestImportedInterfaceResponseParams extends bindings.Struct {
|
| +class _WindowManagerObserverOnCaptureChangedParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - Object obj = null;
|
| + int captureViewId = 0;
|
|
|
| - FactoryRequestImportedInterfaceResponseParams() : super(kVersions.last.size);
|
| + _WindowManagerObserverOnCaptureChangedParams() : super(kVersions.last.size);
|
|
|
| - static FactoryRequestImportedInterfaceResponseParams deserialize(bindings.Message message) {
|
| + static _WindowManagerObserverOnCaptureChangedParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -800,11 +665,11 @@ class FactoryRequestImportedInterfaceResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static FactoryRequestImportedInterfaceResponseParams decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerObserverOnCaptureChangedParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - FactoryRequestImportedInterfaceResponseParams result = new FactoryRequestImportedInterfaceResponseParams();
|
| + _WindowManagerObserverOnCaptureChangedParams result = new _WindowManagerObserverOnCaptureChangedParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -826,7 +691,7 @@ class FactoryRequestImportedInterfaceResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.obj = decoder0.decodeInterfaceRequest(8, false, sample_import_mojom.ImportedInterfaceStub.newFromEndpoint);
|
| + result.captureViewId = decoder0.decodeUint32(8);
|
| }
|
| return result;
|
| }
|
| @@ -834,30 +699,31 @@ class FactoryRequestImportedInterfaceResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInterfaceRequest(obj, 8, false);
|
| + encoder0.encodeUint32(captureViewId, 8);
|
| }
|
|
|
| String toString() {
|
| - return "FactoryRequestImportedInterfaceResponseParams("
|
| - "obj: $obj" ")";
|
| + return "_WindowManagerObserverOnCaptureChangedParams("
|
| + "captureViewId: $captureViewId" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["captureViewId"] = captureViewId;
|
| + return map;
|
| }
|
| }
|
|
|
|
|
| -class _FactoryTakeImportedInterfaceParams extends bindings.Struct {
|
| +class _WindowManagerObserverOnFocusChangedParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - Object obj = null;
|
| + int focusedViewId = 0;
|
|
|
| - _FactoryTakeImportedInterfaceParams() : super(kVersions.last.size);
|
| + _WindowManagerObserverOnFocusChangedParams() : super(kVersions.last.size);
|
|
|
| - static _FactoryTakeImportedInterfaceParams deserialize(bindings.Message message) {
|
| + static _WindowManagerObserverOnFocusChangedParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -866,11 +732,11 @@ class _FactoryTakeImportedInterfaceParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static _FactoryTakeImportedInterfaceParams decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerObserverOnFocusChangedParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - _FactoryTakeImportedInterfaceParams result = new _FactoryTakeImportedInterfaceParams();
|
| + _WindowManagerObserverOnFocusChangedParams result = new _WindowManagerObserverOnFocusChangedParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -892,7 +758,7 @@ class _FactoryTakeImportedInterfaceParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.obj = decoder0.decodeServiceInterface(8, false, sample_import_mojom.ImportedInterfaceProxy.newFromEndpoint);
|
| + result.focusedViewId = decoder0.decodeUint32(8);
|
| }
|
| return result;
|
| }
|
| @@ -900,30 +766,31 @@ class _FactoryTakeImportedInterfaceParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInterface(obj, 8, false);
|
| + encoder0.encodeUint32(focusedViewId, 8);
|
| }
|
|
|
| String toString() {
|
| - return "_FactoryTakeImportedInterfaceParams("
|
| - "obj: $obj" ")";
|
| + return "_WindowManagerObserverOnFocusChangedParams("
|
| + "focusedViewId: $focusedViewId" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["focusedViewId"] = focusedViewId;
|
| + return map;
|
| }
|
| }
|
|
|
|
|
| -class FactoryTakeImportedInterfaceResponseParams extends bindings.Struct {
|
| +class _WindowManagerObserverOnActiveWindowChangedParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - Object obj = null;
|
| + int focusedViewId = 0;
|
|
|
| - FactoryTakeImportedInterfaceResponseParams() : super(kVersions.last.size);
|
| + _WindowManagerObserverOnActiveWindowChangedParams() : super(kVersions.last.size);
|
|
|
| - static FactoryTakeImportedInterfaceResponseParams deserialize(bindings.Message message) {
|
| + static _WindowManagerObserverOnActiveWindowChangedParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -932,11 +799,11 @@ class FactoryTakeImportedInterfaceResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static FactoryTakeImportedInterfaceResponseParams decode(bindings.Decoder decoder0) {
|
| + static _WindowManagerObserverOnActiveWindowChangedParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - FactoryTakeImportedInterfaceResponseParams result = new FactoryTakeImportedInterfaceResponseParams();
|
| + _WindowManagerObserverOnActiveWindowChangedParams result = new _WindowManagerObserverOnActiveWindowChangedParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -958,7 +825,7 @@ class FactoryTakeImportedInterfaceResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.obj = decoder0.decodeServiceInterface(8, false, sample_import_mojom.ImportedInterfaceProxy.newFromEndpoint);
|
| + result.focusedViewId = decoder0.decodeUint32(8);
|
| }
|
| return result;
|
| }
|
| @@ -966,49 +833,116 @@ class FactoryTakeImportedInterfaceResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInterface(obj, 8, false);
|
| + encoder0.encodeUint32(focusedViewId, 8);
|
| }
|
|
|
| String toString() {
|
| - return "FactoryTakeImportedInterfaceResponseParams("
|
| - "obj: $obj" ")";
|
| + return "_WindowManagerObserverOnActiveWindowChangedParams("
|
| + "focusedViewId: $focusedViewId" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["focusedViewId"] = focusedViewId;
|
| + return map;
|
| }
|
| }
|
|
|
| -const int _NamedObject_setNameName = 0;
|
| -const int _NamedObject_getNameName = 1;
|
| -
|
| -abstract class NamedObject {
|
| - static const String serviceName = "sample::NamedObject";
|
| - void setName(String name);
|
| - dynamic getName([Function responseFactory = null]);
|
| +const int _WindowManager_embedName = 0;
|
| +const int _WindowManager_setCaptureName = 1;
|
| +const int _WindowManager_focusWindowName = 2;
|
| +const int _WindowManager_activateWindowName = 3;
|
| +const int _WindowManager_getFocusedAndActiveViewsName = 4;
|
| +
|
| +abstract class WindowManager {
|
| + static const String serviceName = "mojo::WindowManager";
|
| + void embed(String url, Object services, Object exposedServices);
|
| + dynamic setCapture(int viewId,[Function responseFactory = null]);
|
| + dynamic focusWindow(int viewId,[Function responseFactory = null]);
|
| + dynamic activateWindow(int viewId,[Function responseFactory = null]);
|
| + dynamic getFocusedAndActiveViews(Object observer,[Function responseFactory = null]);
|
| }
|
|
|
|
|
| -class _NamedObjectProxyImpl extends bindings.Proxy {
|
| - _NamedObjectProxyImpl.fromEndpoint(
|
| +class _WindowManagerProxyImpl extends bindings.Proxy {
|
| + _WindowManagerProxyImpl.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
|
|
| - _NamedObjectProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + _WindowManagerProxyImpl.fromHandle(core.MojoHandle handle) :
|
| super.fromHandle(handle);
|
|
|
| - _NamedObjectProxyImpl.unbound() : super.unbound();
|
| + _WindowManagerProxyImpl.unbound() : super.unbound();
|
|
|
| - static _NamedObjectProxyImpl newFromEndpoint(
|
| + static _WindowManagerProxyImpl newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For _NamedObjectProxyImpl"));
|
| - return new _NamedObjectProxyImpl.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For _WindowManagerProxyImpl"));
|
| + return new _WindowManagerProxyImpl.fromEndpoint(endpoint);
|
| }
|
|
|
| void handleResponse(bindings.ServiceMessage message) {
|
| switch (message.header.type) {
|
| - case _NamedObject_getNameName:
|
| - var r = NamedObjectGetNameResponseParams.deserialize(
|
| + case _WindowManager_setCaptureName:
|
| + var r = WindowManagerSetCaptureResponseParams.deserialize(
|
| + message.payload);
|
| + if (!message.header.hasRequestId) {
|
| + proxyError("Expected a message with a valid request Id.");
|
| + return;
|
| + }
|
| + Completer c = completerMap[message.header.requestId];
|
| + if (c == null) {
|
| + proxyError(
|
| + "Message had unknown request Id: ${message.header.requestId}");
|
| + return;
|
| + }
|
| + completerMap.remove(message.header.requestId);
|
| + if (c.isCompleted) {
|
| + proxyError("Response completer already completed");
|
| + return;
|
| + }
|
| + c.complete(r);
|
| + break;
|
| + case _WindowManager_focusWindowName:
|
| + var r = WindowManagerFocusWindowResponseParams.deserialize(
|
| + message.payload);
|
| + if (!message.header.hasRequestId) {
|
| + proxyError("Expected a message with a valid request Id.");
|
| + return;
|
| + }
|
| + Completer c = completerMap[message.header.requestId];
|
| + if (c == null) {
|
| + proxyError(
|
| + "Message had unknown request Id: ${message.header.requestId}");
|
| + return;
|
| + }
|
| + completerMap.remove(message.header.requestId);
|
| + if (c.isCompleted) {
|
| + proxyError("Response completer already completed");
|
| + return;
|
| + }
|
| + c.complete(r);
|
| + break;
|
| + case _WindowManager_activateWindowName:
|
| + var r = WindowManagerActivateWindowResponseParams.deserialize(
|
| + message.payload);
|
| + if (!message.header.hasRequestId) {
|
| + proxyError("Expected a message with a valid request Id.");
|
| + return;
|
| + }
|
| + Completer c = completerMap[message.header.requestId];
|
| + if (c == null) {
|
| + proxyError(
|
| + "Message had unknown request Id: ${message.header.requestId}");
|
| + return;
|
| + }
|
| + completerMap.remove(message.header.requestId);
|
| + if (c.isCompleted) {
|
| + proxyError("Response completer already completed");
|
| + return;
|
| + }
|
| + c.complete(r);
|
| + break;
|
| + case _WindowManager_getFocusedAndActiveViewsName:
|
| + var r = WindowManagerGetFocusedAndActiveViewsResponseParams.deserialize(
|
| message.payload);
|
| if (!message.header.hasRequestId) {
|
| proxyError("Expected a message with a valid request Id.");
|
| @@ -1036,73 +970,103 @@ class _NamedObjectProxyImpl extends bindings.Proxy {
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "_NamedObjectProxyImpl($superString)";
|
| + return "_WindowManagerProxyImpl($superString)";
|
| }
|
| }
|
|
|
|
|
| -class _NamedObjectProxyCalls implements NamedObject {
|
| - _NamedObjectProxyImpl _proxyImpl;
|
| +class _WindowManagerProxyCalls implements WindowManager {
|
| + _WindowManagerProxyImpl _proxyImpl;
|
|
|
| - _NamedObjectProxyCalls(this._proxyImpl);
|
| - void setName(String name) {
|
| + _WindowManagerProxyCalls(this._proxyImpl);
|
| + void embed(String url, Object services, Object exposedServices) {
|
| if (!_proxyImpl.isBound) {
|
| _proxyImpl.proxyError("The Proxy is closed.");
|
| return;
|
| }
|
| - var params = new _NamedObjectSetNameParams();
|
| - params.name = name;
|
| - _proxyImpl.sendMessage(params, _NamedObject_setNameName);
|
| + var params = new _WindowManagerEmbedParams();
|
| + params.url = url;
|
| + params.services = services;
|
| + params.exposedServices = exposedServices;
|
| + _proxyImpl.sendMessage(params, _WindowManager_embedName);
|
| + }
|
| + dynamic setCapture(int viewId,[Function responseFactory = null]) {
|
| + var params = new _WindowManagerSetCaptureParams();
|
| + params.viewId = viewId;
|
| + return _proxyImpl.sendMessageWithRequestId(
|
| + params,
|
| + _WindowManager_setCaptureName,
|
| + -1,
|
| + bindings.MessageHeader.kMessageExpectsResponse);
|
| + }
|
| + dynamic focusWindow(int viewId,[Function responseFactory = null]) {
|
| + var params = new _WindowManagerFocusWindowParams();
|
| + params.viewId = viewId;
|
| + return _proxyImpl.sendMessageWithRequestId(
|
| + params,
|
| + _WindowManager_focusWindowName,
|
| + -1,
|
| + bindings.MessageHeader.kMessageExpectsResponse);
|
| + }
|
| + dynamic activateWindow(int viewId,[Function responseFactory = null]) {
|
| + var params = new _WindowManagerActivateWindowParams();
|
| + params.viewId = viewId;
|
| + return _proxyImpl.sendMessageWithRequestId(
|
| + params,
|
| + _WindowManager_activateWindowName,
|
| + -1,
|
| + bindings.MessageHeader.kMessageExpectsResponse);
|
| }
|
| - dynamic getName([Function responseFactory = null]) {
|
| - var params = new _NamedObjectGetNameParams();
|
| + dynamic getFocusedAndActiveViews(Object observer,[Function responseFactory = null]) {
|
| + var params = new _WindowManagerGetFocusedAndActiveViewsParams();
|
| + params.observer = observer;
|
| return _proxyImpl.sendMessageWithRequestId(
|
| params,
|
| - _NamedObject_getNameName,
|
| + _WindowManager_getFocusedAndActiveViewsName,
|
| -1,
|
| bindings.MessageHeader.kMessageExpectsResponse);
|
| }
|
| }
|
|
|
|
|
| -class NamedObjectProxy implements bindings.ProxyBase {
|
| +class WindowManagerProxy implements bindings.ProxyBase {
|
| final bindings.Proxy impl;
|
| - NamedObject ptr;
|
| + WindowManager ptr;
|
|
|
| - NamedObjectProxy(_NamedObjectProxyImpl proxyImpl) :
|
| + WindowManagerProxy(_WindowManagerProxyImpl proxyImpl) :
|
| impl = proxyImpl,
|
| - ptr = new _NamedObjectProxyCalls(proxyImpl);
|
| + ptr = new _WindowManagerProxyCalls(proxyImpl);
|
|
|
| - NamedObjectProxy.fromEndpoint(
|
| + WindowManagerProxy.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) :
|
| - impl = new _NamedObjectProxyImpl.fromEndpoint(endpoint) {
|
| - ptr = new _NamedObjectProxyCalls(impl);
|
| + impl = new _WindowManagerProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _WindowManagerProxyCalls(impl);
|
| }
|
|
|
| - NamedObjectProxy.fromHandle(core.MojoHandle handle) :
|
| - impl = new _NamedObjectProxyImpl.fromHandle(handle) {
|
| - ptr = new _NamedObjectProxyCalls(impl);
|
| + WindowManagerProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new _WindowManagerProxyImpl.fromHandle(handle) {
|
| + ptr = new _WindowManagerProxyCalls(impl);
|
| }
|
|
|
| - NamedObjectProxy.unbound() :
|
| - impl = new _NamedObjectProxyImpl.unbound() {
|
| - ptr = new _NamedObjectProxyCalls(impl);
|
| + WindowManagerProxy.unbound() :
|
| + impl = new _WindowManagerProxyImpl.unbound() {
|
| + ptr = new _WindowManagerProxyCalls(impl);
|
| }
|
|
|
| - factory NamedObjectProxy.connectToService(
|
| + factory WindowManagerProxy.connectToService(
|
| bindings.ServiceConnector s, String url, [String serviceName]) {
|
| - NamedObjectProxy p = new NamedObjectProxy.unbound();
|
| + WindowManagerProxy p = new WindowManagerProxy.unbound();
|
| s.connectToService(url, p, serviceName);
|
| return p;
|
| }
|
|
|
| - static NamedObjectProxy newFromEndpoint(
|
| + static WindowManagerProxy newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For NamedObjectProxy"));
|
| - return new NamedObjectProxy.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For WindowManagerProxy"));
|
| + return new WindowManagerProxy.fromEndpoint(endpoint);
|
| }
|
|
|
| - String get serviceName => NamedObject.serviceName;
|
| + String get serviceName => WindowManager.serviceName;
|
|
|
| Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
|
|
| @@ -1119,33 +1083,50 @@ class NamedObjectProxy implements bindings.ProxyBase {
|
| }
|
|
|
| String toString() {
|
| - return "NamedObjectProxy($impl)";
|
| + return "WindowManagerProxy($impl)";
|
| }
|
| }
|
|
|
|
|
| -class NamedObjectStub extends bindings.Stub {
|
| - NamedObject _impl = null;
|
| +class WindowManagerStub extends bindings.Stub {
|
| + WindowManager _impl = null;
|
|
|
| - NamedObjectStub.fromEndpoint(
|
| + WindowManagerStub.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| : super.fromEndpoint(endpoint);
|
|
|
| - NamedObjectStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + WindowManagerStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| : super.fromHandle(handle);
|
|
|
| - NamedObjectStub.unbound() : super.unbound();
|
| + WindowManagerStub.unbound() : super.unbound();
|
|
|
| - static NamedObjectStub newFromEndpoint(
|
| + static WindowManagerStub newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For NamedObjectStub"));
|
| - return new NamedObjectStub.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For WindowManagerStub"));
|
| + return new WindowManagerStub.fromEndpoint(endpoint);
|
| }
|
|
|
|
|
| - NamedObjectGetNameResponseParams _NamedObjectGetNameResponseParamsFactory(String name) {
|
| - var mojo_factory_result = new NamedObjectGetNameResponseParams();
|
| - mojo_factory_result.name = name;
|
| + WindowManagerSetCaptureResponseParams _WindowManagerSetCaptureResponseParamsFactory(bool success) {
|
| + var mojo_factory_result = new WindowManagerSetCaptureResponseParams();
|
| + mojo_factory_result.success = success;
|
| + return mojo_factory_result;
|
| + }
|
| + WindowManagerFocusWindowResponseParams _WindowManagerFocusWindowResponseParamsFactory(bool success) {
|
| + var mojo_factory_result = new WindowManagerFocusWindowResponseParams();
|
| + mojo_factory_result.success = success;
|
| + return mojo_factory_result;
|
| + }
|
| + WindowManagerActivateWindowResponseParams _WindowManagerActivateWindowResponseParamsFactory(bool success) {
|
| + var mojo_factory_result = new WindowManagerActivateWindowResponseParams();
|
| + mojo_factory_result.success = success;
|
| + return mojo_factory_result;
|
| + }
|
| + WindowManagerGetFocusedAndActiveViewsResponseParams _WindowManagerGetFocusedAndActiveViewsResponseParamsFactory(int captureViewId, int focusedViewId, int activeViewId) {
|
| + var mojo_factory_result = new WindowManagerGetFocusedAndActiveViewsResponseParams();
|
| + mojo_factory_result.captureViewId = captureViewId;
|
| + mojo_factory_result.focusedViewId = focusedViewId;
|
| + mojo_factory_result.activeViewId = activeViewId;
|
| return mojo_factory_result;
|
| }
|
|
|
| @@ -1157,21 +1138,65 @@ class NamedObjectStub extends bindings.Stub {
|
| }
|
| assert(_impl != null);
|
| switch (message.header.type) {
|
| - case _NamedObject_setNameName:
|
| - var params = _NamedObjectSetNameParams.deserialize(
|
| + case _WindowManager_embedName:
|
| + var params = _WindowManagerEmbedParams.deserialize(
|
| message.payload);
|
| - _impl.setName(params.name);
|
| + _impl.embed(params.url, params.services, params.exposedServices);
|
| + break;
|
| + case _WindowManager_setCaptureName:
|
| + var params = _WindowManagerSetCaptureParams.deserialize(
|
| + message.payload);
|
| + var response = _impl.setCapture(params.viewId,_WindowManagerSetCaptureResponseParamsFactory);
|
| + if (response is Future) {
|
| + return response.then((response) {
|
| + if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + _WindowManager_setCaptureName,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + });
|
| + } else if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + _WindowManager_setCaptureName,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + break;
|
| + case _WindowManager_focusWindowName:
|
| + var params = _WindowManagerFocusWindowParams.deserialize(
|
| + message.payload);
|
| + var response = _impl.focusWindow(params.viewId,_WindowManagerFocusWindowResponseParamsFactory);
|
| + if (response is Future) {
|
| + return response.then((response) {
|
| + if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + _WindowManager_focusWindowName,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + });
|
| + } else if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + _WindowManager_focusWindowName,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| break;
|
| - case _NamedObject_getNameName:
|
| - var params = _NamedObjectGetNameParams.deserialize(
|
| + case _WindowManager_activateWindowName:
|
| + var params = _WindowManagerActivateWindowParams.deserialize(
|
| message.payload);
|
| - var response = _impl.getName(_NamedObjectGetNameResponseParamsFactory);
|
| + var response = _impl.activateWindow(params.viewId,_WindowManagerActivateWindowResponseParamsFactory);
|
| if (response is Future) {
|
| return response.then((response) {
|
| if (response != null) {
|
| return buildResponseWithId(
|
| response,
|
| - _NamedObject_getNameName,
|
| + _WindowManager_activateWindowName,
|
| message.header.requestId,
|
| bindings.MessageHeader.kMessageIsResponse);
|
| }
|
| @@ -1179,7 +1204,29 @@ class NamedObjectStub extends bindings.Stub {
|
| } else if (response != null) {
|
| return buildResponseWithId(
|
| response,
|
| - _NamedObject_getNameName,
|
| + _WindowManager_activateWindowName,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + break;
|
| + case _WindowManager_getFocusedAndActiveViewsName:
|
| + var params = _WindowManagerGetFocusedAndActiveViewsParams.deserialize(
|
| + message.payload);
|
| + var response = _impl.getFocusedAndActiveViews(params.observer,_WindowManagerGetFocusedAndActiveViewsResponseParamsFactory);
|
| + if (response is Future) {
|
| + return response.then((response) {
|
| + if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + _WindowManager_getFocusedAndActiveViewsName,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + });
|
| + } else if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + _WindowManager_getFocusedAndActiveViewsName,
|
| message.header.requestId,
|
| bindings.MessageHeader.kMessageIsResponse);
|
| }
|
| @@ -1191,133 +1238,49 @@ class NamedObjectStub extends bindings.Stub {
|
| return null;
|
| }
|
|
|
| - NamedObject get impl => _impl;
|
| - set impl(NamedObject d) {
|
| + WindowManager get impl => _impl;
|
| + set impl(WindowManager d) {
|
| assert(_impl == null);
|
| _impl = d;
|
| }
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "NamedObjectStub($superString)";
|
| + return "WindowManagerStub($superString)";
|
| }
|
|
|
| int get version => 0;
|
| }
|
|
|
| -const int _Factory_doStuffName = 0;
|
| -const int _Factory_doStuff2Name = 1;
|
| -const int _Factory_createNamedObjectName = 2;
|
| -const int _Factory_requestImportedInterfaceName = 3;
|
| -const int _Factory_takeImportedInterfaceName = 4;
|
| +const int _WindowManagerObserver_onCaptureChangedName = 0;
|
| +const int _WindowManagerObserver_onFocusChangedName = 1;
|
| +const int _WindowManagerObserver_onActiveWindowChangedName = 2;
|
|
|
| -abstract class Factory {
|
| +abstract class WindowManagerObserver {
|
| static const String serviceName = null;
|
| - dynamic doStuff(Request request,core.MojoMessagePipeEndpoint pipe,[Function responseFactory = null]);
|
| - dynamic doStuff2(core.MojoDataPipeConsumer pipe,[Function responseFactory = null]);
|
| - void createNamedObject(Object obj);
|
| - dynamic requestImportedInterface(Object obj,[Function responseFactory = null]);
|
| - dynamic takeImportedInterface(Object obj,[Function responseFactory = null]);
|
| + void onCaptureChanged(int captureViewId);
|
| + void onFocusChanged(int focusedViewId);
|
| + void onActiveWindowChanged(int focusedViewId);
|
| }
|
|
|
|
|
| -class _FactoryProxyImpl extends bindings.Proxy {
|
| - _FactoryProxyImpl.fromEndpoint(
|
| +class _WindowManagerObserverProxyImpl extends bindings.Proxy {
|
| + _WindowManagerObserverProxyImpl.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
|
|
| - _FactoryProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + _WindowManagerObserverProxyImpl.fromHandle(core.MojoHandle handle) :
|
| super.fromHandle(handle);
|
|
|
| - _FactoryProxyImpl.unbound() : super.unbound();
|
| + _WindowManagerObserverProxyImpl.unbound() : super.unbound();
|
|
|
| - static _FactoryProxyImpl newFromEndpoint(
|
| + static _WindowManagerObserverProxyImpl newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For _FactoryProxyImpl"));
|
| - return new _FactoryProxyImpl.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For _WindowManagerObserverProxyImpl"));
|
| + return new _WindowManagerObserverProxyImpl.fromEndpoint(endpoint);
|
| }
|
|
|
| void handleResponse(bindings.ServiceMessage message) {
|
| switch (message.header.type) {
|
| - case _Factory_doStuffName:
|
| - var r = FactoryDoStuffResponseParams.deserialize(
|
| - message.payload);
|
| - if (!message.header.hasRequestId) {
|
| - proxyError("Expected a message with a valid request Id.");
|
| - return;
|
| - }
|
| - Completer c = completerMap[message.header.requestId];
|
| - if (c == null) {
|
| - proxyError(
|
| - "Message had unknown request Id: ${message.header.requestId}");
|
| - return;
|
| - }
|
| - completerMap.remove(message.header.requestId);
|
| - if (c.isCompleted) {
|
| - proxyError("Response completer already completed");
|
| - return;
|
| - }
|
| - c.complete(r);
|
| - break;
|
| - case _Factory_doStuff2Name:
|
| - var r = FactoryDoStuff2ResponseParams.deserialize(
|
| - message.payload);
|
| - if (!message.header.hasRequestId) {
|
| - proxyError("Expected a message with a valid request Id.");
|
| - return;
|
| - }
|
| - Completer c = completerMap[message.header.requestId];
|
| - if (c == null) {
|
| - proxyError(
|
| - "Message had unknown request Id: ${message.header.requestId}");
|
| - return;
|
| - }
|
| - completerMap.remove(message.header.requestId);
|
| - if (c.isCompleted) {
|
| - proxyError("Response completer already completed");
|
| - return;
|
| - }
|
| - c.complete(r);
|
| - break;
|
| - case _Factory_requestImportedInterfaceName:
|
| - var r = FactoryRequestImportedInterfaceResponseParams.deserialize(
|
| - message.payload);
|
| - if (!message.header.hasRequestId) {
|
| - proxyError("Expected a message with a valid request Id.");
|
| - return;
|
| - }
|
| - Completer c = completerMap[message.header.requestId];
|
| - if (c == null) {
|
| - proxyError(
|
| - "Message had unknown request Id: ${message.header.requestId}");
|
| - return;
|
| - }
|
| - completerMap.remove(message.header.requestId);
|
| - if (c.isCompleted) {
|
| - proxyError("Response completer already completed");
|
| - return;
|
| - }
|
| - c.complete(r);
|
| - break;
|
| - case _Factory_takeImportedInterfaceName:
|
| - var r = FactoryTakeImportedInterfaceResponseParams.deserialize(
|
| - message.payload);
|
| - if (!message.header.hasRequestId) {
|
| - proxyError("Expected a message with a valid request Id.");
|
| - return;
|
| - }
|
| - Completer c = completerMap[message.header.requestId];
|
| - if (c == null) {
|
| - proxyError(
|
| - "Message had unknown request Id: ${message.header.requestId}");
|
| - return;
|
| - }
|
| - completerMap.remove(message.header.requestId);
|
| - if (c.isCompleted) {
|
| - proxyError("Response completer already completed");
|
| - return;
|
| - }
|
| - c.complete(r);
|
| - break;
|
| default:
|
| proxyError("Unexpected message type: ${message.header.type}");
|
| close(immediate: true);
|
| @@ -1327,102 +1290,83 @@ class _FactoryProxyImpl extends bindings.Proxy {
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "_FactoryProxyImpl($superString)";
|
| + return "_WindowManagerObserverProxyImpl($superString)";
|
| }
|
| }
|
|
|
|
|
| -class _FactoryProxyCalls implements Factory {
|
| - _FactoryProxyImpl _proxyImpl;
|
| +class _WindowManagerObserverProxyCalls implements WindowManagerObserver {
|
| + _WindowManagerObserverProxyImpl _proxyImpl;
|
|
|
| - _FactoryProxyCalls(this._proxyImpl);
|
| - dynamic doStuff(Request request,core.MojoMessagePipeEndpoint pipe,[Function responseFactory = null]) {
|
| - var params = new _FactoryDoStuffParams();
|
| - params.request = request;
|
| - params.pipe = pipe;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - _Factory_doStuffName,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| - }
|
| - dynamic doStuff2(core.MojoDataPipeConsumer pipe,[Function responseFactory = null]) {
|
| - var params = new _FactoryDoStuff2Params();
|
| - params.pipe = pipe;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - _Factory_doStuff2Name,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| - }
|
| - void createNamedObject(Object obj) {
|
| + _WindowManagerObserverProxyCalls(this._proxyImpl);
|
| + void onCaptureChanged(int captureViewId) {
|
| if (!_proxyImpl.isBound) {
|
| _proxyImpl.proxyError("The Proxy is closed.");
|
| return;
|
| }
|
| - var params = new _FactoryCreateNamedObjectParams();
|
| - params.obj = obj;
|
| - _proxyImpl.sendMessage(params, _Factory_createNamedObjectName);
|
| + var params = new _WindowManagerObserverOnCaptureChangedParams();
|
| + params.captureViewId = captureViewId;
|
| + _proxyImpl.sendMessage(params, _WindowManagerObserver_onCaptureChangedName);
|
| }
|
| - dynamic requestImportedInterface(Object obj,[Function responseFactory = null]) {
|
| - var params = new _FactoryRequestImportedInterfaceParams();
|
| - params.obj = obj;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - _Factory_requestImportedInterfaceName,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| + void onFocusChanged(int focusedViewId) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new _WindowManagerObserverOnFocusChangedParams();
|
| + params.focusedViewId = focusedViewId;
|
| + _proxyImpl.sendMessage(params, _WindowManagerObserver_onFocusChangedName);
|
| }
|
| - dynamic takeImportedInterface(Object obj,[Function responseFactory = null]) {
|
| - var params = new _FactoryTakeImportedInterfaceParams();
|
| - params.obj = obj;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - _Factory_takeImportedInterfaceName,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| + void onActiveWindowChanged(int focusedViewId) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new _WindowManagerObserverOnActiveWindowChangedParams();
|
| + params.focusedViewId = focusedViewId;
|
| + _proxyImpl.sendMessage(params, _WindowManagerObserver_onActiveWindowChangedName);
|
| }
|
| }
|
|
|
|
|
| -class FactoryProxy implements bindings.ProxyBase {
|
| +class WindowManagerObserverProxy implements bindings.ProxyBase {
|
| final bindings.Proxy impl;
|
| - Factory ptr;
|
| + WindowManagerObserver ptr;
|
|
|
| - FactoryProxy(_FactoryProxyImpl proxyImpl) :
|
| + WindowManagerObserverProxy(_WindowManagerObserverProxyImpl proxyImpl) :
|
| impl = proxyImpl,
|
| - ptr = new _FactoryProxyCalls(proxyImpl);
|
| + ptr = new _WindowManagerObserverProxyCalls(proxyImpl);
|
|
|
| - FactoryProxy.fromEndpoint(
|
| + WindowManagerObserverProxy.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) :
|
| - impl = new _FactoryProxyImpl.fromEndpoint(endpoint) {
|
| - ptr = new _FactoryProxyCalls(impl);
|
| + impl = new _WindowManagerObserverProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _WindowManagerObserverProxyCalls(impl);
|
| }
|
|
|
| - FactoryProxy.fromHandle(core.MojoHandle handle) :
|
| - impl = new _FactoryProxyImpl.fromHandle(handle) {
|
| - ptr = new _FactoryProxyCalls(impl);
|
| + WindowManagerObserverProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new _WindowManagerObserverProxyImpl.fromHandle(handle) {
|
| + ptr = new _WindowManagerObserverProxyCalls(impl);
|
| }
|
|
|
| - FactoryProxy.unbound() :
|
| - impl = new _FactoryProxyImpl.unbound() {
|
| - ptr = new _FactoryProxyCalls(impl);
|
| + WindowManagerObserverProxy.unbound() :
|
| + impl = new _WindowManagerObserverProxyImpl.unbound() {
|
| + ptr = new _WindowManagerObserverProxyCalls(impl);
|
| }
|
|
|
| - factory FactoryProxy.connectToService(
|
| + factory WindowManagerObserverProxy.connectToService(
|
| bindings.ServiceConnector s, String url, [String serviceName]) {
|
| - FactoryProxy p = new FactoryProxy.unbound();
|
| + WindowManagerObserverProxy p = new WindowManagerObserverProxy.unbound();
|
| s.connectToService(url, p, serviceName);
|
| return p;
|
| }
|
|
|
| - static FactoryProxy newFromEndpoint(
|
| + static WindowManagerObserverProxy newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For FactoryProxy"));
|
| - return new FactoryProxy.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For WindowManagerObserverProxy"));
|
| + return new WindowManagerObserverProxy.fromEndpoint(endpoint);
|
| }
|
|
|
| - String get serviceName => Factory.serviceName;
|
| + String get serviceName => WindowManagerObserver.serviceName;
|
|
|
| Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
|
|
| @@ -1439,51 +1383,30 @@ class FactoryProxy implements bindings.ProxyBase {
|
| }
|
|
|
| String toString() {
|
| - return "FactoryProxy($impl)";
|
| + return "WindowManagerObserverProxy($impl)";
|
| }
|
| }
|
|
|
|
|
| -class FactoryStub extends bindings.Stub {
|
| - Factory _impl = null;
|
| +class WindowManagerObserverStub extends bindings.Stub {
|
| + WindowManagerObserver _impl = null;
|
|
|
| - FactoryStub.fromEndpoint(
|
| + WindowManagerObserverStub.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| : super.fromEndpoint(endpoint);
|
|
|
| - FactoryStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + WindowManagerObserverStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| : super.fromHandle(handle);
|
|
|
| - FactoryStub.unbound() : super.unbound();
|
| + WindowManagerObserverStub.unbound() : super.unbound();
|
|
|
| - static FactoryStub newFromEndpoint(
|
| + static WindowManagerObserverStub newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For FactoryStub"));
|
| - return new FactoryStub.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For WindowManagerObserverStub"));
|
| + return new WindowManagerObserverStub.fromEndpoint(endpoint);
|
| }
|
|
|
|
|
| - FactoryDoStuffResponseParams _FactoryDoStuffResponseParamsFactory(Response response, String text) {
|
| - var mojo_factory_result = new FactoryDoStuffResponseParams();
|
| - mojo_factory_result.response = response;
|
| - mojo_factory_result.text = text;
|
| - return mojo_factory_result;
|
| - }
|
| - FactoryDoStuff2ResponseParams _FactoryDoStuff2ResponseParamsFactory(String text) {
|
| - var mojo_factory_result = new FactoryDoStuff2ResponseParams();
|
| - mojo_factory_result.text = text;
|
| - return mojo_factory_result;
|
| - }
|
| - FactoryRequestImportedInterfaceResponseParams _FactoryRequestImportedInterfaceResponseParamsFactory(Object obj) {
|
| - var mojo_factory_result = new FactoryRequestImportedInterfaceResponseParams();
|
| - mojo_factory_result.obj = obj;
|
| - return mojo_factory_result;
|
| - }
|
| - FactoryTakeImportedInterfaceResponseParams _FactoryTakeImportedInterfaceResponseParamsFactory(Object obj) {
|
| - var mojo_factory_result = new FactoryTakeImportedInterfaceResponseParams();
|
| - mojo_factory_result.obj = obj;
|
| - return mojo_factory_result;
|
| - }
|
|
|
| dynamic handleMessage(bindings.ServiceMessage message) {
|
| if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| @@ -1493,98 +1416,20 @@ class FactoryStub extends bindings.Stub {
|
| }
|
| assert(_impl != null);
|
| switch (message.header.type) {
|
| - case _Factory_doStuffName:
|
| - var params = _FactoryDoStuffParams.deserialize(
|
| - message.payload);
|
| - var response = _impl.doStuff(params.request,params.pipe,_FactoryDoStuffResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_doStuffName,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_doStuffName,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - break;
|
| - case _Factory_doStuff2Name:
|
| - var params = _FactoryDoStuff2Params.deserialize(
|
| + case _WindowManagerObserver_onCaptureChangedName:
|
| + var params = _WindowManagerObserverOnCaptureChangedParams.deserialize(
|
| message.payload);
|
| - var response = _impl.doStuff2(params.pipe,_FactoryDoStuff2ResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_doStuff2Name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_doStuff2Name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| + _impl.onCaptureChanged(params.captureViewId);
|
| break;
|
| - case _Factory_createNamedObjectName:
|
| - var params = _FactoryCreateNamedObjectParams.deserialize(
|
| + case _WindowManagerObserver_onFocusChangedName:
|
| + var params = _WindowManagerObserverOnFocusChangedParams.deserialize(
|
| message.payload);
|
| - _impl.createNamedObject(params.obj);
|
| + _impl.onFocusChanged(params.focusedViewId);
|
| break;
|
| - case _Factory_requestImportedInterfaceName:
|
| - var params = _FactoryRequestImportedInterfaceParams.deserialize(
|
| + case _WindowManagerObserver_onActiveWindowChangedName:
|
| + var params = _WindowManagerObserverOnActiveWindowChangedParams.deserialize(
|
| message.payload);
|
| - var response = _impl.requestImportedInterface(params.obj,_FactoryRequestImportedInterfaceResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_requestImportedInterfaceName,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_requestImportedInterfaceName,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - break;
|
| - case _Factory_takeImportedInterfaceName:
|
| - var params = _FactoryTakeImportedInterfaceParams.deserialize(
|
| - message.payload);
|
| - var response = _impl.takeImportedInterface(params.obj,_FactoryTakeImportedInterfaceResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_takeImportedInterfaceName,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - _Factory_takeImportedInterfaceName,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| + _impl.onActiveWindowChanged(params.focusedViewId);
|
| break;
|
| default:
|
| throw new bindings.MojoCodecError("Unexpected message name");
|
| @@ -1593,15 +1438,15 @@ class FactoryStub extends bindings.Stub {
|
| return null;
|
| }
|
|
|
| - Factory get impl => _impl;
|
| - set impl(Factory d) {
|
| + WindowManagerObserver get impl => _impl;
|
| + set impl(WindowManagerObserver d) {
|
| assert(_impl == null);
|
| _impl = d;
|
| }
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "FactoryStub($superString)";
|
| + return "WindowManagerObserverStub($superString)";
|
| }
|
|
|
| int get version => 0;
|
|
|