| 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 #ifndef CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ | 6 #define CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" | 14 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 15 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 15 #include "mojo/public/cpp/bindings/interface_request.h" |
| 16 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" | 16 #include "mojo/public/cpp/system/core.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 // A ServiceRegistry exposes local services that have been added using | 20 // A ServiceRegistry exposes local services that have been added using |
| 21 // AddService to a paired remote ServiceRegistry and provides local access to | 21 // AddService to a paired remote ServiceRegistry and provides local access to |
| 22 // services exposed by the remote ServiceRegistry through | 22 // services exposed by the remote ServiceRegistry through |
| 23 // ConnectToRemoteService. | 23 // ConnectToRemoteService. |
| 24 class CONTENT_EXPORT ServiceRegistry { | 24 class CONTENT_EXPORT ServiceRegistry { |
| 25 public: | 25 public: |
| 26 virtual ~ServiceRegistry() {} | 26 virtual ~ServiceRegistry() {} |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const base::Callback<void(mojo::InterfaceRequest<Interface>)> | 65 const base::Callback<void(mojo::InterfaceRequest<Interface>)> |
| 66 service_factory, | 66 service_factory, |
| 67 mojo::ScopedMessagePipeHandle handle) { | 67 mojo::ScopedMessagePipeHandle handle) { |
| 68 service_factory.Run(mojo::MakeRequest<Interface>(handle.Pass())); | 68 service_factory.Run(mojo::MakeRequest<Interface>(handle.Pass())); |
| 69 } | 69 } |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace content | 72 } // namespace content |
| 73 | 73 |
| 74 #endif // CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ | 74 #endif // CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ |
| OLD | NEW |