| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_PUBLIC_APPLICATION_SERVICE_CONNECTOR_H_ | |
| 6 #define MOJO_PUBLIC_APPLICATION_SERVICE_CONNECTOR_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "mojo/public/cpp/system/message_pipe.h" | |
| 11 | |
| 12 namespace mojo { | |
| 13 | |
| 14 struct ConnectionContext; | |
| 15 | |
| 16 // |ServiceConnector| is the generic, type-unsafe interface for objects used by | |
| 17 // |ServiceProviderImpl| to connect generic "interface requests" (i.e., just | |
| 18 // message pipes) specified by service name to service implementations. | |
| 19 class ServiceConnector { | |
| 20 public: | |
| 21 virtual ~ServiceConnector() {} | |
| 22 | |
| 23 // Connects to the |ServiceConnector|'s service (if the |ServiceConnector| | |
| 24 // wishes to refuse the connection, it should simply drop |handle|). | |
| 25 virtual void ConnectToService(const ConnectionContext& connection_context, | |
| 26 ScopedMessagePipeHandle handle) = 0; | |
| 27 }; | |
| 28 | |
| 29 } // namespace mojo | |
| 30 | |
| 31 #endif // MOJO_PUBLIC_APPLICATION_SERVICE_CONNECTOR_H_ | |
| OLD | NEW |