[user_shell][armadillo] Get UserShellContext from the environment for armadillo.

This sets us up to be able to delete the UserShell interface entirely,
which existed solely to pass dependencies to user shells. This is not
necessary.

TESTING=none

MI4-1445 #comment [user_shell] Get UserShellContext from the environment.

Change-Id: I04c0409319278c37a57771cc19204d5f5bebbdd2
diff --git a/public/dart/widgets/lib/src/modular/user_shell_widget.dart b/public/dart/widgets/lib/src/modular/user_shell_widget.dart
index f75df9d..97f54c8 100644
--- a/public/dart/widgets/lib/src/modular/user_shell_widget.dart
+++ b/public/dart/widgets/lib/src/modular/user_shell_widget.dart
@@ -28,9 +28,6 @@
   /// The [StartupContext] to [advertise] its [UserShell] services to.
   final StartupContext _startupContext;
 
-  /// The binding for the [UserShell] service implemented by [UserShellImpl].
-  final UserShellBinding _userShellBinding;
-
   /// The binding for the [Lifecycle] service implemented by [UserShellImpl].
   final LifecycleBinding _lifecycleBinding;
 
@@ -58,7 +55,6 @@
         userShellModel: userShellModel,
         onWindowMetricsChanged: onWindowMetricsChanged,
         child: child,
-        userShellBinding: new UserShellBinding(),
         lifecycleBinding: new LifecycleBinding(),
       );
 
@@ -67,21 +63,19 @@
     T userShellModel,
     VoidCallback onWindowMetricsChanged,
     Widget child,
-    UserShellBinding userShellBinding,
     LifecycleBinding lifecycleBinding,
   })  : _startupContext = startupContext,
         _userShellModel = userShellModel,
         _onWindowMetricsChanged = onWindowMetricsChanged,
         _child = child,
-        _userShellBinding = userShellBinding,
         _lifecycleBinding = lifecycleBinding,
         _userShell = new UserShellImpl(
+          startupContext: startupContext,
           onReady: userShellModel?.onReady,
           onStopping: userShellModel?.onStop,
           onNotify: userShellModel?.onNotify,
           watchAll: userShellModel?.watchAll,
           onStop: () {
-            userShellBinding.close();
             lifecycleBinding.close();
             fuchsia.exit(0);
           },
@@ -116,16 +110,11 @@
         ),
       );
 
-  /// Advertises [_userShell] as a [UserShell] to the rest of the system via
+  /// Advertises [_userShell] as a [LifeCycle] to the rest of the system via
   /// the [StartupContext].
   void advertise() {
     _startupContext.outgoingServices
-      ..addServiceForName(
-        (InterfaceRequest<UserShell> request) =>
-            _userShellBinding.bind(_userShell, request),
-        UserShell.$serviceName,
-      )
-      ..addServiceForName(
+      .addServiceForName(
         (InterfaceRequest<Lifecycle> request) =>
             _lifecycleBinding.bind(_userShell, request),
         Lifecycle.$serviceName,
diff --git a/public/lib/user/dart/BUILD.gn b/public/lib/user/dart/BUILD.gn
index 20d625e..0fa7b31 100644
--- a/public/lib/user/dart/BUILD.gn
+++ b/public/lib/user/dart/BUILD.gn
@@ -19,6 +19,7 @@
     "//peridot/public/fidl/fuchsia.modular",
     "//topaz/public/dart/fidl",
     "//topaz/public/dart/fuchsia",
+    "//topaz/public/lib/app/dart",
     "//topaz/public/lib/story/dart",
   ]
 }
diff --git a/public/lib/user/dart/lib/src/user_shell_impl.dart b/public/lib/user/dart/lib/src/user_shell_impl.dart
index 05a80f2..9a68c7a 100644
--- a/public/lib/user/dart/lib/src/user_shell_impl.dart
+++ b/public/lib/user/dart/lib/src/user_shell_impl.dart
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 import 'package:fidl_fuchsia_modular/fidl.dart';
-import 'package:fidl/fidl.dart';
+import 'package:lib.app.dart/app.dart';
 import 'package:lib.story.dart/story.dart';
 
 /// Called when [UserShell.initialize] occurs.
@@ -28,7 +28,7 @@
 
 /// Implements a UserShell for receiving the services a [UserShell] needs to
 /// operate.
-class UserShellImpl implements UserShell, Lifecycle {
+class UserShellImpl implements Lifecycle {
   /// Binding for the actual UserShell interface object.
   final UserShellContextProxy _userShellContextProxy =
       new UserShellContextProxy();
@@ -68,19 +68,19 @@
 
   /// Constructor.
   UserShellImpl({
+    startupContext,
     this.onReady,
     this.onStopping,
     this.onStop,
     this.onNotify,
     bool watchAll,
-  }) : watchAll = watchAll ?? false;
+  }) : watchAll = watchAll ?? false {
+    connectToService(startupContext.environmentServices, _userShellContextProxy.ctrl);
+    _initialize();
+  }
 
-  @override
-  void initialize(
-    InterfaceHandle<UserShellContext> userShellContextHandle,
-  ) {
+  void _initialize() {
     if (onReady != null) {
-      _userShellContextProxy.ctrl.bind(userShellContextHandle);
       _userShellContextProxy
         ..getStoryProvider(
           _storyProviderProxy.ctrl.request(),