Index: mojo/services/launcher/launcher.cc |
diff --git a/mojo/services/launcher/launcher.cc b/mojo/services/launcher/launcher.cc |
index 97a29c3f137042e25ecae8f3c119266cd3ba12b6..e2d6c7604dd0447b5d27ab88716837f02f1c7196 100644 |
--- a/mojo/services/launcher/launcher.cc |
+++ b/mojo/services/launcher/launcher.cc |
@@ -10,6 +10,7 @@ |
#include "mojo/public/cpp/application/application_connection.h" |
#include "mojo/public/cpp/application/application_delegate.h" |
#include "mojo/public/cpp/application/application_impl.h" |
+#include "mojo/public/cpp/application/context_interface_provider.h" |
#include "mojo/services/public/cpp/view_manager/types.h" |
#include "mojo/services/public/interfaces/launcher/launcher.mojom.h" |
#include "mojo/services/public/interfaces/network/network_service.mojom.h" |
@@ -30,8 +31,7 @@ class LauncherApp; |
class LauncherConnection : public InterfaceImpl<Launcher> { |
public: |
- LauncherConnection(ApplicationConnection* connection, LauncherApp* app) |
- : app_(app) {} |
+ explicit LauncherConnection(LauncherApp* app) : app_(app) {} |
virtual ~LauncherConnection() {} |
private: |
@@ -86,9 +86,11 @@ class LaunchInstance { |
DISALLOW_COPY_AND_ASSIGN(LaunchInstance); |
}; |
-class LauncherApp : public ApplicationDelegate { |
+class LauncherApp |
+ : public ApplicationDelegate, |
+ public ContextInterfaceProvider<LauncherConnection, LauncherApp> { |
public: |
- LauncherApp() { |
+ LauncherApp() : ContextInterfaceProvider(this) { |
handler_map_["text/html"] = "mojo:mojo_html_viewer"; |
handler_map_["image/png"] = "mojo:mojo_media_viewer"; |
} |
@@ -115,7 +117,7 @@ class LauncherApp : public ApplicationDelegate { |
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) |
MOJO_OVERRIDE { |
- connection->AddService<LauncherConnection>(this); |
+ connection->AddServiceProvider(this); |
return true; |
} |