Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart

Issue 1433183002: Generate Mojom Types for Dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify identifier_store for Go and Dart Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart b/mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart
index 98fc97a72f669074d6c565d3a30fa9c73f0a27f2..e837aa6edbd6024162c15fe8a8b35aff83a11c80 100644
--- a/mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart
@@ -8,6 +8,8 @@ import 'dart:async';
import 'package:mojo/bindings.dart' as bindings;
import 'package:mojo/core.dart' as core;
+import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types;
+import 'package:mojo/mojo/service_describer.mojom.dart' as service_describer;
@@ -77,6 +79,16 @@ class AuthenticationServiceSelectAccountParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _authentication_AuthenticationService_SelectAccount_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AuthenticationServiceSelectAccountParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ReturnLastSelected')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.BOOL),
+ ];
+}
+
class AuthenticationServiceSelectAccountResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -153,6 +165,22 @@ class AuthenticationServiceSelectAccountResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _authentication_AuthenticationService_SelectAccount_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AuthenticationServiceSelectAccountResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Username')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Error')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+ ];
+}
+
class AuthenticationServiceGetOAuth2TokenParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -245,6 +273,23 @@ class AuthenticationServiceGetOAuth2TokenParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _authentication_AuthenticationService_GetOAuth2Token_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AuthenticationServiceGetOAuth2TokenParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Username')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Scopes')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..elementType = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)))),
+ ];
+}
+
class AuthenticationServiceGetOAuth2TokenResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -321,6 +366,22 @@ class AuthenticationServiceGetOAuth2TokenResponseParams extends bindings.Struct
}
}
+mojom_types.MojomStruct _authentication_AuthenticationService_GetOAuth2Token_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AuthenticationServiceGetOAuth2TokenResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Token')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Error')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+ ];
+}
+
class AuthenticationServiceClearOAuth2TokenParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -388,6 +449,18 @@ class AuthenticationServiceClearOAuth2TokenParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _authentication_AuthenticationService_ClearOAuth2Token_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'AuthenticationServiceClearOAuth2TokenParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Token')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+ ];
+}
+
+
const int kAuthenticationService_selectAccount_name = 0;
const int kAuthenticationService_getOAuth2Token_name = 1;
const int kAuthenticationService_clearOAuth2Token_name = 2;
@@ -395,6 +468,37 @@ const int kAuthenticationService_clearOAuth2Token_name = 2;
const String AuthenticationServiceName =
'authentication::AuthenticationService';
+mojom_types.MojomInterface _authentication_AuthenticationService__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "AuthenticationService")
+ ..interfaceName = "AuthenticationService"
+ ..methods = <int, mojom_types.MojomMethod>{
+kAuthenticationService_selectAccount_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "SelectAccount")
+ ..ordinal = kAuthenticationService_selectAccount_name
+ ..responseParams = _authentication_AuthenticationService_SelectAccount_ResponseParams__()..parameters = _authentication_AuthenticationService_SelectAccount_Params__(),kAuthenticationService_getOAuth2Token_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "GetOAuth2Token")
+ ..ordinal = kAuthenticationService_getOAuth2Token_name
+ ..responseParams = _authentication_AuthenticationService_GetOAuth2Token_ResponseParams__()..parameters = _authentication_AuthenticationService_GetOAuth2Token_Params__(),kAuthenticationService_clearOAuth2Token_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "ClearOAuth2Token")
+ ..ordinal = kAuthenticationService_clearOAuth2Token_name..parameters = _authentication_AuthenticationService_ClearOAuth2Token_Params__(),
+ };
+}
+
+class _AuthenticationServiceServiceDescription extends service_describer.ServiceDescription {
+ // Avoid infinite loop by overriding serviceDescription field.
+ final service_describer.ServiceDescription serviceDescription = null;
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _authentication_AuthenticationService__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class AuthenticationService {
dynamic selectAccount(bool returnLastSelected,[Function responseFactory = null]);
dynamic getOAuth2Token(String username,List<String> scopes,[Function responseFactory = null]);
@@ -420,6 +524,9 @@ class AuthenticationServiceProxyImpl extends bindings.Proxy {
String get name => AuthenticationServiceName;
+ service_describer.ServiceDescription get serviceDescription =>
+ new _AuthenticationServiceServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case kAuthenticationService_selectAccount_name:
@@ -680,6 +787,78 @@ class AuthenticationServiceStub extends bindings.Stub {
}
int get version => 0;
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _AuthenticationServiceServiceDescription();
+}
+
+
+
+
+
+
+
+
+var _MojomDesc__ = _initDescriptions();
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new Map<String, mojom_types.UserDefinedType>();
+
+ map["_authentication_AuthenticationService_SelectAccount_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _authentication_AuthenticationService_SelectAccount_Params__();
+
+
+
+
+
+ map["_authentication_AuthenticationService_SelectAccount_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _authentication_AuthenticationService_SelectAccount_ResponseParams__();
+
+
+
+
+
+
+
+ map["_authentication_AuthenticationService_GetOAuth2Token_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _authentication_AuthenticationService_GetOAuth2Token_Params__();
+
+
+
+
+
+
+
+ map["_authentication_AuthenticationService_GetOAuth2Token_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _authentication_AuthenticationService_GetOAuth2Token_ResponseParams__();
+
+
+
+
+
+
+
+ map["_authentication_AuthenticationService_ClearOAuth2Token_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _authentication_AuthenticationService_ClearOAuth2Token_Params__();
+
+
+
+
+
+ map["_authentication_AuthenticationService__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _authentication_AuthenticationService__();
+
+ return map;
+}
+
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ return _MojomDesc__;
}

Powered by Google App Engine
This is Rietveld 408576698