| Index: mojo/services/launcher/launcher.cc
|
| diff --git a/mojo/services/launcher/launcher.cc b/mojo/services/launcher/launcher.cc
|
| index f9fc881c807a1b0186447a9c7f400aa379e59aee..10ba604fe1fda46a01db3bcc74873a88fd4e7d71 100644
|
| --- a/mojo/services/launcher/launcher.cc
|
| +++ b/mojo/services/launcher/launcher.cc
|
| @@ -26,10 +26,9 @@ typedef mojo::Callback<void(String handler_url, String view_url,
|
|
|
| class LauncherApp;
|
|
|
| -class LauncherConnection : public InterfaceImpl<Launcher> {
|
| +class LauncherConnection : public InterfaceImplDeleteOnError<Launcher> {
|
| public:
|
| - LauncherConnection(ApplicationConnection* connection, LauncherApp* app)
|
| - : app_(app) {}
|
| + explicit LauncherConnection(LauncherApp* app) : app_(app) {}
|
| virtual ~LauncherConnection() {}
|
|
|
| private:
|
| @@ -94,7 +93,8 @@ class LaunchInstance : public URLLoaderClient {
|
| DISALLOW_COPY_AND_ASSIGN(LaunchInstance);
|
| };
|
|
|
| -class LauncherApp : public ApplicationDelegate {
|
| +class LauncherApp : public ApplicationDelegate,
|
| + public InterfaceProvider<Launcher> {
|
| public:
|
| LauncherApp() {
|
| handler_map_["text/html"] = "mojo:mojo_html_viewer";
|
| @@ -123,10 +123,16 @@ class LauncherApp : public ApplicationDelegate {
|
|
|
| virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
|
| MOJO_OVERRIDE {
|
| - connection->AddService<LauncherConnection>(this);
|
| + connection->AddServiceProvider(this);
|
| return true;
|
| }
|
|
|
| + // Overridden from InterfaceProvider<Launcher>
|
| + virtual void BindToRequest(ApplicationConnection* connection,
|
| + InterfaceRequest<Launcher> request) OVERRIDE {
|
| + mojo::BindToRequest(new LauncherConnection(this), &request);
|
| + }
|
| +
|
| HandlerMap handler_map_;
|
|
|
| NetworkServicePtr network_service_;
|
|
|