OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 library activity_mojom; | 5 library activity_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 | 10 |
(...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 abstract class Activity { | 1682 abstract class Activity { |
1683 static const String serviceName = "activity::Activity"; | 1683 static const String serviceName = "activity::Activity"; |
1684 void getUserFeedback(Object userFeedback); | 1684 void getUserFeedback(Object userFeedback); |
1685 void startActivity(Intent intent); | 1685 void startActivity(Intent intent); |
1686 void finishCurrentActivity(); | 1686 void finishCurrentActivity(); |
1687 void setTaskDescription(TaskDescription description); | 1687 void setTaskDescription(TaskDescription description); |
1688 void setSystemUiVisibility(SystemUiVisibility visibility); | 1688 void setSystemUiVisibility(SystemUiVisibility visibility); |
1689 void setRequestedOrientation(ScreenOrientation orientation); | 1689 void setRequestedOrientation(ScreenOrientation orientation); |
1690 } | 1690 } |
1691 | 1691 |
1692 | 1692 class _ActivityProxyControl |
1693 class _ActivityProxyControl extends bindings.ProxyMessageHandler | 1693 extends bindings.ProxyMessageHandler |
1694 implements bindings.ProxyControl { | 1694 implements bindings.ProxyControl { |
1695 _ActivityProxyControl.fromEndpoint( | 1695 _ActivityProxyControl.fromEndpoint( |
1696 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 1696 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
1697 | 1697 |
1698 _ActivityProxyControl.fromHandle( | 1698 _ActivityProxyControl.fromHandle( |
1699 core.MojoHandle handle) : super.fromHandle(handle); | 1699 core.MojoHandle handle) : super.fromHandle(handle); |
1700 | 1700 |
1701 _ActivityProxyControl.unbound() : super.unbound(); | 1701 _ActivityProxyControl.unbound() : super.unbound(); |
1702 | 1702 |
1703 service_describer.ServiceDescription get serviceDescription => | 1703 service_describer.ServiceDescription get serviceDescription => |
1704 new _ActivityServiceDescription(); | 1704 new _ActivityServiceDescription(); |
1705 | 1705 |
1706 String get serviceName => Activity.serviceName; | 1706 String get serviceName => Activity.serviceName; |
1707 | 1707 |
1708 @override | |
1709 void handleResponse(bindings.ServiceMessage message) { | 1708 void handleResponse(bindings.ServiceMessage message) { |
1710 switch (message.header.type) { | 1709 switch (message.header.type) { |
1711 default: | 1710 default: |
1712 proxyError("Unexpected message type: ${message.header.type}"); | 1711 proxyError("Unexpected message type: ${message.header.type}"); |
1713 close(immediate: true); | 1712 close(immediate: true); |
1714 break; | 1713 break; |
1715 } | 1714 } |
1716 } | 1715 } |
1717 | 1716 |
1718 @override | 1717 @override |
1719 String toString() { | 1718 String toString() { |
1720 var superString = super.toString(); | 1719 var superString = super.toString(); |
1721 return "_ActivityProxyControl($superString)"; | 1720 return "_ActivityProxyControl($superString)"; |
1722 } | 1721 } |
1723 } | 1722 } |
1724 | 1723 |
1725 | 1724 class ActivityProxy |
1726 class ActivityProxy extends bindings.Proxy | 1725 extends bindings.Proxy |
1727 implements Activity { | 1726 implements Activity { |
1728 ActivityProxy.fromEndpoint( | 1727 ActivityProxy.fromEndpoint( |
1729 core.MojoMessagePipeEndpoint endpoint) | 1728 core.MojoMessagePipeEndpoint endpoint) |
1730 : super(new _ActivityProxyControl.fromEndpoint(endpoint)); | 1729 : super(new _ActivityProxyControl.fromEndpoint(endpoint)); |
1731 | 1730 |
1732 ActivityProxy.fromHandle(core.MojoHandle handle) | 1731 ActivityProxy.fromHandle(core.MojoHandle handle) |
1733 : super(new _ActivityProxyControl.fromHandle(handle)); | 1732 : super(new _ActivityProxyControl.fromHandle(handle)); |
1734 | 1733 |
1735 ActivityProxy.unbound() | 1734 ActivityProxy.unbound() |
1736 : super(new _ActivityProxyControl.unbound()); | 1735 : super(new _ActivityProxyControl.unbound()); |
1737 | 1736 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 ctrl.proxyError("The Proxy is closed."); | 1802 ctrl.proxyError("The Proxy is closed."); |
1804 return; | 1803 return; |
1805 } | 1804 } |
1806 var params = new _ActivitySetRequestedOrientationParams(); | 1805 var params = new _ActivitySetRequestedOrientationParams(); |
1807 params.orientation = orientation; | 1806 params.orientation = orientation; |
1808 ctrl.sendMessage(params, | 1807 ctrl.sendMessage(params, |
1809 _activityMethodSetRequestedOrientationName); | 1808 _activityMethodSetRequestedOrientationName); |
1810 } | 1809 } |
1811 } | 1810 } |
1812 | 1811 |
1813 | 1812 class _ActivityStubControl |
1814 class ActivityStub extends bindings.Stub { | 1813 extends bindings.StubMessageHandler |
| 1814 implements bindings.StubControl<Activity> { |
1815 Activity _impl; | 1815 Activity _impl; |
1816 | 1816 |
1817 ActivityStub.fromEndpoint( | 1817 _ActivityStubControl.fromEndpoint( |
1818 core.MojoMessagePipeEndpoint endpoint, [Activity impl]) | 1818 core.MojoMessagePipeEndpoint endpoint, [Activity impl]) |
1819 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 1819 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
1820 _impl = impl; | 1820 _impl = impl; |
1821 } | 1821 } |
1822 | 1822 |
1823 ActivityStub.fromHandle( | 1823 _ActivityStubControl.fromHandle( |
1824 core.MojoHandle handle, [Activity impl]) | 1824 core.MojoHandle handle, [Activity impl]) |
1825 : super.fromHandle(handle, autoBegin: impl != null) { | 1825 : super.fromHandle(handle, autoBegin: impl != null) { |
1826 _impl = impl; | 1826 _impl = impl; |
1827 } | 1827 } |
1828 | 1828 |
1829 ActivityStub.unbound([this._impl]) : super.unbound(); | 1829 _ActivityStubControl.unbound([this._impl]) : super.unbound(); |
1830 | |
1831 static ActivityStub newFromEndpoint( | |
1832 core.MojoMessagePipeEndpoint endpoint) { | |
1833 assert(endpoint.setDescription("For ActivityStub")); | |
1834 return new ActivityStub.fromEndpoint(endpoint); | |
1835 } | |
1836 | 1830 |
1837 | 1831 |
1838 | 1832 |
1839 dynamic handleMessage(bindings.ServiceMessage message) { | 1833 dynamic handleMessage(bindings.ServiceMessage message) { |
1840 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 1834 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
1841 return bindings.ControlMessageHandler.handleMessage(this, | 1835 return bindings.ControlMessageHandler.handleMessage(this, |
1842 0, | 1836 0, |
1843 message); | 1837 message); |
1844 } | 1838 } |
1845 if (_impl == null) { | 1839 if (_impl == null) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 } | 1887 } |
1894 | 1888 |
1895 @override | 1889 @override |
1896 void bind(core.MojoMessagePipeEndpoint endpoint) { | 1890 void bind(core.MojoMessagePipeEndpoint endpoint) { |
1897 super.bind(endpoint); | 1891 super.bind(endpoint); |
1898 if (!isOpen && (_impl != null)) { | 1892 if (!isOpen && (_impl != null)) { |
1899 beginHandlingEvents(); | 1893 beginHandlingEvents(); |
1900 } | 1894 } |
1901 } | 1895 } |
1902 | 1896 |
| 1897 @override |
1903 String toString() { | 1898 String toString() { |
1904 var superString = super.toString(); | 1899 var superString = super.toString(); |
1905 return "ActivityStub($superString)"; | 1900 return "_ActivityStubControl($superString)"; |
1906 } | 1901 } |
1907 | 1902 |
1908 int get version => 0; | 1903 int get version => 0; |
1909 | 1904 |
1910 static service_describer.ServiceDescription _cachedServiceDescription; | 1905 static service_describer.ServiceDescription _cachedServiceDescription; |
1911 static service_describer.ServiceDescription get serviceDescription { | 1906 static service_describer.ServiceDescription get serviceDescription { |
1912 if (_cachedServiceDescription == null) { | 1907 if (_cachedServiceDescription == null) { |
1913 _cachedServiceDescription = new _ActivityServiceDescription(); | 1908 _cachedServiceDescription = new _ActivityServiceDescription(); |
1914 } | 1909 } |
1915 return _cachedServiceDescription; | 1910 return _cachedServiceDescription; |
1916 } | 1911 } |
1917 } | 1912 } |
1918 | 1913 |
| 1914 class ActivityStub |
| 1915 extends bindings.Stub<Activity> |
| 1916 implements Activity { |
| 1917 ActivityStub.fromEndpoint( |
| 1918 core.MojoMessagePipeEndpoint endpoint, [Activity impl]) |
| 1919 : super(new _ActivityStubControl.fromEndpoint(endpoint, impl)); |
| 1920 |
| 1921 ActivityStub.fromHandle( |
| 1922 core.MojoHandle handle, [Activity impl]) |
| 1923 : super(new _ActivityStubControl.fromHandle(handle, impl)); |
| 1924 |
| 1925 ActivityStub.unbound([Activity impl]) |
| 1926 : super(new _ActivityStubControl.unbound(impl)); |
| 1927 |
| 1928 static ActivityStub newFromEndpoint( |
| 1929 core.MojoMessagePipeEndpoint endpoint) { |
| 1930 assert(endpoint.setDescription("For ActivityStub")); |
| 1931 return new ActivityStub.fromEndpoint(endpoint); |
| 1932 } |
| 1933 |
| 1934 static service_describer.ServiceDescription get serviceDescription => |
| 1935 _ActivityStubControl.serviceDescription; |
| 1936 |
| 1937 |
| 1938 void getUserFeedback(Object userFeedback) { |
| 1939 return impl.getUserFeedback(userFeedback); |
| 1940 } |
| 1941 void startActivity(Intent intent) { |
| 1942 return impl.startActivity(intent); |
| 1943 } |
| 1944 void finishCurrentActivity() { |
| 1945 return impl.finishCurrentActivity(); |
| 1946 } |
| 1947 void setTaskDescription(TaskDescription description) { |
| 1948 return impl.setTaskDescription(description); |
| 1949 } |
| 1950 void setSystemUiVisibility(SystemUiVisibility visibility) { |
| 1951 return impl.setSystemUiVisibility(visibility); |
| 1952 } |
| 1953 void setRequestedOrientation(ScreenOrientation orientation) { |
| 1954 return impl.setRequestedOrientation(orientation); |
| 1955 } |
| 1956 } |
| 1957 |
1919 const int _pathServiceMethodGetAppDataDirName = 0; | 1958 const int _pathServiceMethodGetAppDataDirName = 0; |
1920 const int _pathServiceMethodGetFilesDirName = 1; | 1959 const int _pathServiceMethodGetFilesDirName = 1; |
1921 const int _pathServiceMethodGetCacheDirName = 2; | 1960 const int _pathServiceMethodGetCacheDirName = 2; |
1922 | 1961 |
1923 class _PathServiceServiceDescription implements service_describer.ServiceDescrip
tion { | 1962 class _PathServiceServiceDescription implements service_describer.ServiceDescrip
tion { |
1924 dynamic getTopLevelInterface([Function responseFactory]) => | 1963 dynamic getTopLevelInterface([Function responseFactory]) => |
1925 responseFactory(null); | 1964 responseFactory(null); |
1926 | 1965 |
1927 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1966 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
1928 responseFactory(null); | 1967 responseFactory(null); |
1929 | 1968 |
1930 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1969 dynamic getAllTypeDefinitions([Function responseFactory]) => |
1931 responseFactory(null); | 1970 responseFactory(null); |
1932 } | 1971 } |
1933 | 1972 |
1934 abstract class PathService { | 1973 abstract class PathService { |
1935 static const String serviceName = "activity::PathService"; | 1974 static const String serviceName = "activity::PathService"; |
1936 dynamic getAppDataDir([Function responseFactory = null]); | 1975 dynamic getAppDataDir([Function responseFactory = null]); |
1937 dynamic getFilesDir([Function responseFactory = null]); | 1976 dynamic getFilesDir([Function responseFactory = null]); |
1938 dynamic getCacheDir([Function responseFactory = null]); | 1977 dynamic getCacheDir([Function responseFactory = null]); |
1939 } | 1978 } |
1940 | 1979 |
1941 | 1980 class _PathServiceProxyControl |
1942 class _PathServiceProxyControl extends bindings.ProxyMessageHandler | 1981 extends bindings.ProxyMessageHandler |
1943 implements bindings.ProxyControl { | 1982 implements bindings.ProxyControl { |
1944 _PathServiceProxyControl.fromEndpoint( | 1983 _PathServiceProxyControl.fromEndpoint( |
1945 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 1984 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
1946 | 1985 |
1947 _PathServiceProxyControl.fromHandle( | 1986 _PathServiceProxyControl.fromHandle( |
1948 core.MojoHandle handle) : super.fromHandle(handle); | 1987 core.MojoHandle handle) : super.fromHandle(handle); |
1949 | 1988 |
1950 _PathServiceProxyControl.unbound() : super.unbound(); | 1989 _PathServiceProxyControl.unbound() : super.unbound(); |
1951 | 1990 |
1952 service_describer.ServiceDescription get serviceDescription => | 1991 service_describer.ServiceDescription get serviceDescription => |
1953 new _PathServiceServiceDescription(); | 1992 new _PathServiceServiceDescription(); |
1954 | 1993 |
1955 String get serviceName => PathService.serviceName; | 1994 String get serviceName => PathService.serviceName; |
1956 | 1995 |
1957 @override | |
1958 void handleResponse(bindings.ServiceMessage message) { | 1996 void handleResponse(bindings.ServiceMessage message) { |
1959 switch (message.header.type) { | 1997 switch (message.header.type) { |
1960 case _pathServiceMethodGetAppDataDirName: | 1998 case _pathServiceMethodGetAppDataDirName: |
1961 var r = PathServiceGetAppDataDirResponseParams.deserialize( | 1999 var r = PathServiceGetAppDataDirResponseParams.deserialize( |
1962 message.payload); | 2000 message.payload); |
1963 if (!message.header.hasRequestId) { | 2001 if (!message.header.hasRequestId) { |
1964 proxyError("Expected a message with a valid request Id."); | 2002 proxyError("Expected a message with a valid request Id."); |
1965 return; | 2003 return; |
1966 } | 2004 } |
1967 Completer c = completerMap[message.header.requestId]; | 2005 Completer c = completerMap[message.header.requestId]; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 } | 2062 } |
2025 } | 2063 } |
2026 | 2064 |
2027 @override | 2065 @override |
2028 String toString() { | 2066 String toString() { |
2029 var superString = super.toString(); | 2067 var superString = super.toString(); |
2030 return "_PathServiceProxyControl($superString)"; | 2068 return "_PathServiceProxyControl($superString)"; |
2031 } | 2069 } |
2032 } | 2070 } |
2033 | 2071 |
2034 | 2072 class PathServiceProxy |
2035 class PathServiceProxy extends bindings.Proxy | 2073 extends bindings.Proxy |
2036 implements PathService { | 2074 implements PathService { |
2037 PathServiceProxy.fromEndpoint( | 2075 PathServiceProxy.fromEndpoint( |
2038 core.MojoMessagePipeEndpoint endpoint) | 2076 core.MojoMessagePipeEndpoint endpoint) |
2039 : super(new _PathServiceProxyControl.fromEndpoint(endpoint)); | 2077 : super(new _PathServiceProxyControl.fromEndpoint(endpoint)); |
2040 | 2078 |
2041 PathServiceProxy.fromHandle(core.MojoHandle handle) | 2079 PathServiceProxy.fromHandle(core.MojoHandle handle) |
2042 : super(new _PathServiceProxyControl.fromHandle(handle)); | 2080 : super(new _PathServiceProxyControl.fromHandle(handle)); |
2043 | 2081 |
2044 PathServiceProxy.unbound() | 2082 PathServiceProxy.unbound() |
2045 : super(new _PathServiceProxyControl.unbound()); | 2083 : super(new _PathServiceProxyControl.unbound()); |
2046 | 2084 |
(...skipping 30 matching lines...) Expand all Loading... |
2077 dynamic getCacheDir([Function responseFactory = null]) { | 2115 dynamic getCacheDir([Function responseFactory = null]) { |
2078 var params = new _PathServiceGetCacheDirParams(); | 2116 var params = new _PathServiceGetCacheDirParams(); |
2079 return ctrl.sendMessageWithRequestId( | 2117 return ctrl.sendMessageWithRequestId( |
2080 params, | 2118 params, |
2081 _pathServiceMethodGetCacheDirName, | 2119 _pathServiceMethodGetCacheDirName, |
2082 -1, | 2120 -1, |
2083 bindings.MessageHeader.kMessageExpectsResponse); | 2121 bindings.MessageHeader.kMessageExpectsResponse); |
2084 } | 2122 } |
2085 } | 2123 } |
2086 | 2124 |
2087 | 2125 class _PathServiceStubControl |
2088 class PathServiceStub extends bindings.Stub { | 2126 extends bindings.StubMessageHandler |
| 2127 implements bindings.StubControl<PathService> { |
2089 PathService _impl; | 2128 PathService _impl; |
2090 | 2129 |
2091 PathServiceStub.fromEndpoint( | 2130 _PathServiceStubControl.fromEndpoint( |
2092 core.MojoMessagePipeEndpoint endpoint, [PathService impl]) | 2131 core.MojoMessagePipeEndpoint endpoint, [PathService impl]) |
2093 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 2132 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
2094 _impl = impl; | 2133 _impl = impl; |
2095 } | 2134 } |
2096 | 2135 |
2097 PathServiceStub.fromHandle( | 2136 _PathServiceStubControl.fromHandle( |
2098 core.MojoHandle handle, [PathService impl]) | 2137 core.MojoHandle handle, [PathService impl]) |
2099 : super.fromHandle(handle, autoBegin: impl != null) { | 2138 : super.fromHandle(handle, autoBegin: impl != null) { |
2100 _impl = impl; | 2139 _impl = impl; |
2101 } | 2140 } |
2102 | 2141 |
2103 PathServiceStub.unbound([this._impl]) : super.unbound(); | 2142 _PathServiceStubControl.unbound([this._impl]) : super.unbound(); |
2104 | |
2105 static PathServiceStub newFromEndpoint( | |
2106 core.MojoMessagePipeEndpoint endpoint) { | |
2107 assert(endpoint.setDescription("For PathServiceStub")); | |
2108 return new PathServiceStub.fromEndpoint(endpoint); | |
2109 } | |
2110 | 2143 |
2111 | 2144 |
2112 PathServiceGetAppDataDirResponseParams _pathServiceGetAppDataDirResponseParams
Factory(String path) { | 2145 PathServiceGetAppDataDirResponseParams _pathServiceGetAppDataDirResponseParams
Factory(String path) { |
2113 var result = new PathServiceGetAppDataDirResponseParams(); | 2146 var result = new PathServiceGetAppDataDirResponseParams(); |
2114 result.path = path; | 2147 result.path = path; |
2115 return result; | 2148 return result; |
2116 } | 2149 } |
2117 PathServiceGetFilesDirResponseParams _pathServiceGetFilesDirResponseParamsFact
ory(String path) { | 2150 PathServiceGetFilesDirResponseParams _pathServiceGetFilesDirResponseParamsFact
ory(String path) { |
2118 var result = new PathServiceGetFilesDirResponseParams(); | 2151 var result = new PathServiceGetFilesDirResponseParams(); |
2119 result.path = path; | 2152 result.path = path; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 } | 2247 } |
2215 | 2248 |
2216 @override | 2249 @override |
2217 void bind(core.MojoMessagePipeEndpoint endpoint) { | 2250 void bind(core.MojoMessagePipeEndpoint endpoint) { |
2218 super.bind(endpoint); | 2251 super.bind(endpoint); |
2219 if (!isOpen && (_impl != null)) { | 2252 if (!isOpen && (_impl != null)) { |
2220 beginHandlingEvents(); | 2253 beginHandlingEvents(); |
2221 } | 2254 } |
2222 } | 2255 } |
2223 | 2256 |
| 2257 @override |
2224 String toString() { | 2258 String toString() { |
2225 var superString = super.toString(); | 2259 var superString = super.toString(); |
2226 return "PathServiceStub($superString)"; | 2260 return "_PathServiceStubControl($superString)"; |
2227 } | 2261 } |
2228 | 2262 |
2229 int get version => 0; | 2263 int get version => 0; |
2230 | 2264 |
2231 static service_describer.ServiceDescription _cachedServiceDescription; | 2265 static service_describer.ServiceDescription _cachedServiceDescription; |
2232 static service_describer.ServiceDescription get serviceDescription { | 2266 static service_describer.ServiceDescription get serviceDescription { |
2233 if (_cachedServiceDescription == null) { | 2267 if (_cachedServiceDescription == null) { |
2234 _cachedServiceDescription = new _PathServiceServiceDescription(); | 2268 _cachedServiceDescription = new _PathServiceServiceDescription(); |
2235 } | 2269 } |
2236 return _cachedServiceDescription; | 2270 return _cachedServiceDescription; |
2237 } | 2271 } |
2238 } | 2272 } |
2239 | 2273 |
| 2274 class PathServiceStub |
| 2275 extends bindings.Stub<PathService> |
| 2276 implements PathService { |
| 2277 PathServiceStub.fromEndpoint( |
| 2278 core.MojoMessagePipeEndpoint endpoint, [PathService impl]) |
| 2279 : super(new _PathServiceStubControl.fromEndpoint(endpoint, impl)); |
| 2280 |
| 2281 PathServiceStub.fromHandle( |
| 2282 core.MojoHandle handle, [PathService impl]) |
| 2283 : super(new _PathServiceStubControl.fromHandle(handle, impl)); |
| 2284 |
| 2285 PathServiceStub.unbound([PathService impl]) |
| 2286 : super(new _PathServiceStubControl.unbound(impl)); |
| 2287 |
| 2288 static PathServiceStub newFromEndpoint( |
| 2289 core.MojoMessagePipeEndpoint endpoint) { |
| 2290 assert(endpoint.setDescription("For PathServiceStub")); |
| 2291 return new PathServiceStub.fromEndpoint(endpoint); |
| 2292 } |
| 2293 |
| 2294 static service_describer.ServiceDescription get serviceDescription => |
| 2295 _PathServiceStubControl.serviceDescription; |
| 2296 |
| 2297 |
| 2298 dynamic getAppDataDir([Function responseFactory = null]) { |
| 2299 return impl.getAppDataDir(responseFactory); |
| 2300 } |
| 2301 dynamic getFilesDir([Function responseFactory = null]) { |
| 2302 return impl.getFilesDir(responseFactory); |
| 2303 } |
| 2304 dynamic getCacheDir([Function responseFactory = null]) { |
| 2305 return impl.getCacheDir(responseFactory); |
| 2306 } |
| 2307 } |
| 2308 |
2240 const int _userFeedbackMethodPerformHapticFeedbackName = 0; | 2309 const int _userFeedbackMethodPerformHapticFeedbackName = 0; |
2241 const int _userFeedbackMethodPerformAuralFeedbackName = 1; | 2310 const int _userFeedbackMethodPerformAuralFeedbackName = 1; |
2242 | 2311 |
2243 class _UserFeedbackServiceDescription implements service_describer.ServiceDescri
ption { | 2312 class _UserFeedbackServiceDescription implements service_describer.ServiceDescri
ption { |
2244 dynamic getTopLevelInterface([Function responseFactory]) => | 2313 dynamic getTopLevelInterface([Function responseFactory]) => |
2245 responseFactory(null); | 2314 responseFactory(null); |
2246 | 2315 |
2247 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2316 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
2248 responseFactory(null); | 2317 responseFactory(null); |
2249 | 2318 |
2250 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2319 dynamic getAllTypeDefinitions([Function responseFactory]) => |
2251 responseFactory(null); | 2320 responseFactory(null); |
2252 } | 2321 } |
2253 | 2322 |
2254 abstract class UserFeedback { | 2323 abstract class UserFeedback { |
2255 static const String serviceName = null; | 2324 static const String serviceName = null; |
2256 void performHapticFeedback(HapticFeedbackType type); | 2325 void performHapticFeedback(HapticFeedbackType type); |
2257 void performAuralFeedback(AuralFeedbackType type); | 2326 void performAuralFeedback(AuralFeedbackType type); |
2258 } | 2327 } |
2259 | 2328 |
2260 | 2329 class _UserFeedbackProxyControl |
2261 class _UserFeedbackProxyControl extends bindings.ProxyMessageHandler | 2330 extends bindings.ProxyMessageHandler |
2262 implements bindings.ProxyControl { | 2331 implements bindings.ProxyControl { |
2263 _UserFeedbackProxyControl.fromEndpoint( | 2332 _UserFeedbackProxyControl.fromEndpoint( |
2264 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 2333 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
2265 | 2334 |
2266 _UserFeedbackProxyControl.fromHandle( | 2335 _UserFeedbackProxyControl.fromHandle( |
2267 core.MojoHandle handle) : super.fromHandle(handle); | 2336 core.MojoHandle handle) : super.fromHandle(handle); |
2268 | 2337 |
2269 _UserFeedbackProxyControl.unbound() : super.unbound(); | 2338 _UserFeedbackProxyControl.unbound() : super.unbound(); |
2270 | 2339 |
2271 service_describer.ServiceDescription get serviceDescription => | 2340 service_describer.ServiceDescription get serviceDescription => |
2272 new _UserFeedbackServiceDescription(); | 2341 new _UserFeedbackServiceDescription(); |
2273 | 2342 |
2274 String get serviceName => UserFeedback.serviceName; | 2343 String get serviceName => UserFeedback.serviceName; |
2275 | 2344 |
2276 @override | |
2277 void handleResponse(bindings.ServiceMessage message) { | 2345 void handleResponse(bindings.ServiceMessage message) { |
2278 switch (message.header.type) { | 2346 switch (message.header.type) { |
2279 default: | 2347 default: |
2280 proxyError("Unexpected message type: ${message.header.type}"); | 2348 proxyError("Unexpected message type: ${message.header.type}"); |
2281 close(immediate: true); | 2349 close(immediate: true); |
2282 break; | 2350 break; |
2283 } | 2351 } |
2284 } | 2352 } |
2285 | 2353 |
2286 @override | 2354 @override |
2287 String toString() { | 2355 String toString() { |
2288 var superString = super.toString(); | 2356 var superString = super.toString(); |
2289 return "_UserFeedbackProxyControl($superString)"; | 2357 return "_UserFeedbackProxyControl($superString)"; |
2290 } | 2358 } |
2291 } | 2359 } |
2292 | 2360 |
2293 | 2361 class UserFeedbackProxy |
2294 class UserFeedbackProxy extends bindings.Proxy | 2362 extends bindings.Proxy |
2295 implements UserFeedback { | 2363 implements UserFeedback { |
2296 UserFeedbackProxy.fromEndpoint( | 2364 UserFeedbackProxy.fromEndpoint( |
2297 core.MojoMessagePipeEndpoint endpoint) | 2365 core.MojoMessagePipeEndpoint endpoint) |
2298 : super(new _UserFeedbackProxyControl.fromEndpoint(endpoint)); | 2366 : super(new _UserFeedbackProxyControl.fromEndpoint(endpoint)); |
2299 | 2367 |
2300 UserFeedbackProxy.fromHandle(core.MojoHandle handle) | 2368 UserFeedbackProxy.fromHandle(core.MojoHandle handle) |
2301 : super(new _UserFeedbackProxyControl.fromHandle(handle)); | 2369 : super(new _UserFeedbackProxyControl.fromHandle(handle)); |
2302 | 2370 |
2303 UserFeedbackProxy.unbound() | 2371 UserFeedbackProxy.unbound() |
2304 : super(new _UserFeedbackProxyControl.unbound()); | 2372 : super(new _UserFeedbackProxyControl.unbound()); |
2305 | 2373 |
(...skipping 26 matching lines...) Expand all Loading... |
2332 ctrl.proxyError("The Proxy is closed."); | 2400 ctrl.proxyError("The Proxy is closed."); |
2333 return; | 2401 return; |
2334 } | 2402 } |
2335 var params = new _UserFeedbackPerformAuralFeedbackParams(); | 2403 var params = new _UserFeedbackPerformAuralFeedbackParams(); |
2336 params.type = type; | 2404 params.type = type; |
2337 ctrl.sendMessage(params, | 2405 ctrl.sendMessage(params, |
2338 _userFeedbackMethodPerformAuralFeedbackName); | 2406 _userFeedbackMethodPerformAuralFeedbackName); |
2339 } | 2407 } |
2340 } | 2408 } |
2341 | 2409 |
2342 | 2410 class _UserFeedbackStubControl |
2343 class UserFeedbackStub extends bindings.Stub { | 2411 extends bindings.StubMessageHandler |
| 2412 implements bindings.StubControl<UserFeedback> { |
2344 UserFeedback _impl; | 2413 UserFeedback _impl; |
2345 | 2414 |
2346 UserFeedbackStub.fromEndpoint( | 2415 _UserFeedbackStubControl.fromEndpoint( |
2347 core.MojoMessagePipeEndpoint endpoint, [UserFeedback impl]) | 2416 core.MojoMessagePipeEndpoint endpoint, [UserFeedback impl]) |
2348 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 2417 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
2349 _impl = impl; | 2418 _impl = impl; |
2350 } | 2419 } |
2351 | 2420 |
2352 UserFeedbackStub.fromHandle( | 2421 _UserFeedbackStubControl.fromHandle( |
2353 core.MojoHandle handle, [UserFeedback impl]) | 2422 core.MojoHandle handle, [UserFeedback impl]) |
2354 : super.fromHandle(handle, autoBegin: impl != null) { | 2423 : super.fromHandle(handle, autoBegin: impl != null) { |
2355 _impl = impl; | 2424 _impl = impl; |
2356 } | 2425 } |
2357 | 2426 |
2358 UserFeedbackStub.unbound([this._impl]) : super.unbound(); | 2427 _UserFeedbackStubControl.unbound([this._impl]) : super.unbound(); |
2359 | |
2360 static UserFeedbackStub newFromEndpoint( | |
2361 core.MojoMessagePipeEndpoint endpoint) { | |
2362 assert(endpoint.setDescription("For UserFeedbackStub")); | |
2363 return new UserFeedbackStub.fromEndpoint(endpoint); | |
2364 } | |
2365 | 2428 |
2366 | 2429 |
2367 | 2430 |
2368 dynamic handleMessage(bindings.ServiceMessage message) { | 2431 dynamic handleMessage(bindings.ServiceMessage message) { |
2369 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2432 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
2370 return bindings.ControlMessageHandler.handleMessage(this, | 2433 return bindings.ControlMessageHandler.handleMessage(this, |
2371 0, | 2434 0, |
2372 message); | 2435 message); |
2373 } | 2436 } |
2374 if (_impl == null) { | 2437 if (_impl == null) { |
(...skipping 29 matching lines...) Expand all Loading... |
2404 } | 2467 } |
2405 | 2468 |
2406 @override | 2469 @override |
2407 void bind(core.MojoMessagePipeEndpoint endpoint) { | 2470 void bind(core.MojoMessagePipeEndpoint endpoint) { |
2408 super.bind(endpoint); | 2471 super.bind(endpoint); |
2409 if (!isOpen && (_impl != null)) { | 2472 if (!isOpen && (_impl != null)) { |
2410 beginHandlingEvents(); | 2473 beginHandlingEvents(); |
2411 } | 2474 } |
2412 } | 2475 } |
2413 | 2476 |
| 2477 @override |
2414 String toString() { | 2478 String toString() { |
2415 var superString = super.toString(); | 2479 var superString = super.toString(); |
2416 return "UserFeedbackStub($superString)"; | 2480 return "_UserFeedbackStubControl($superString)"; |
2417 } | 2481 } |
2418 | 2482 |
2419 int get version => 0; | 2483 int get version => 0; |
2420 | 2484 |
2421 static service_describer.ServiceDescription _cachedServiceDescription; | 2485 static service_describer.ServiceDescription _cachedServiceDescription; |
2422 static service_describer.ServiceDescription get serviceDescription { | 2486 static service_describer.ServiceDescription get serviceDescription { |
2423 if (_cachedServiceDescription == null) { | 2487 if (_cachedServiceDescription == null) { |
2424 _cachedServiceDescription = new _UserFeedbackServiceDescription(); | 2488 _cachedServiceDescription = new _UserFeedbackServiceDescription(); |
2425 } | 2489 } |
2426 return _cachedServiceDescription; | 2490 return _cachedServiceDescription; |
2427 } | 2491 } |
2428 } | 2492 } |
2429 | 2493 |
| 2494 class UserFeedbackStub |
| 2495 extends bindings.Stub<UserFeedback> |
| 2496 implements UserFeedback { |
| 2497 UserFeedbackStub.fromEndpoint( |
| 2498 core.MojoMessagePipeEndpoint endpoint, [UserFeedback impl]) |
| 2499 : super(new _UserFeedbackStubControl.fromEndpoint(endpoint, impl)); |
| 2500 |
| 2501 UserFeedbackStub.fromHandle( |
| 2502 core.MojoHandle handle, [UserFeedback impl]) |
| 2503 : super(new _UserFeedbackStubControl.fromHandle(handle, impl)); |
| 2504 |
| 2505 UserFeedbackStub.unbound([UserFeedback impl]) |
| 2506 : super(new _UserFeedbackStubControl.unbound(impl)); |
| 2507 |
| 2508 static UserFeedbackStub newFromEndpoint( |
| 2509 core.MojoMessagePipeEndpoint endpoint) { |
| 2510 assert(endpoint.setDescription("For UserFeedbackStub")); |
| 2511 return new UserFeedbackStub.fromEndpoint(endpoint); |
| 2512 } |
| 2513 |
| 2514 static service_describer.ServiceDescription get serviceDescription => |
| 2515 _UserFeedbackStubControl.serviceDescription; |
| 2516 |
| 2517 |
| 2518 void performHapticFeedback(HapticFeedbackType type) { |
| 2519 return impl.performHapticFeedback(type); |
| 2520 } |
| 2521 void performAuralFeedback(AuralFeedbackType type) { |
| 2522 return impl.performAuralFeedback(type); |
| 2523 } |
| 2524 } |
| 2525 |
2430 | 2526 |
2431 | 2527 |
OLD | NEW |