OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_ |
6 #define CONTENT_COMMON_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_ | 6 #define CONTENT_COMMON_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_ |
7 | 7 |
8 #include "content/public/common/associated_interface_provider.h" | 8 #include "content/public/common/associated_interface_provider.h" |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 11 matching lines...) Expand all Loading... |
22 mojom::AssociatedInterfaceProviderAssociatedPtr proxy); | 22 mojom::AssociatedInterfaceProviderAssociatedPtr proxy); |
23 // Constructs a local provider with no remote interfaces. This is useful in | 23 // Constructs a local provider with no remote interfaces. This is useful in |
24 // conjunction with OverrideBinderForTesting(), in test environments where | 24 // conjunction with OverrideBinderForTesting(), in test environments where |
25 // there may not be a remote |mojom::AssociatedInterfaceProvider| available. | 25 // there may not be a remote |mojom::AssociatedInterfaceProvider| available. |
26 AssociatedInterfaceProviderImpl(); | 26 AssociatedInterfaceProviderImpl(); |
27 ~AssociatedInterfaceProviderImpl() override; | 27 ~AssociatedInterfaceProviderImpl() override; |
28 | 28 |
29 // AssociatedInterfaceProvider: | 29 // AssociatedInterfaceProvider: |
30 void GetInterface(const std::string& name, | 30 void GetInterface(const std::string& name, |
31 mojo::ScopedInterfaceEndpointHandle handle) override; | 31 mojo::ScopedInterfaceEndpointHandle handle) override; |
32 mojo::AssociatedGroup* GetAssociatedGroup() override; | |
33 void OverrideBinderForTesting( | 32 void OverrideBinderForTesting( |
34 const std::string& name, | 33 const std::string& name, |
35 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) | 34 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) |
36 override; | 35 override; |
37 | 36 |
38 private: | 37 private: |
39 class LocalProvider; | 38 class LocalProvider; |
40 | 39 |
41 mojom::AssociatedInterfaceProviderAssociatedPtr proxy_; | 40 mojom::AssociatedInterfaceProviderAssociatedPtr proxy_; |
42 | 41 |
43 std::unique_ptr<LocalProvider> local_provider_; | 42 std::unique_ptr<LocalProvider> local_provider_; |
44 | 43 |
45 DISALLOW_COPY_AND_ASSIGN(AssociatedInterfaceProviderImpl); | 44 DISALLOW_COPY_AND_ASSIGN(AssociatedInterfaceProviderImpl); |
46 }; | 45 }; |
47 | 46 |
48 } // namespace content | 47 } // namespace content |
49 | 48 |
50 #endif // CONTENT_COMMON_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_ | 49 #endif // CONTENT_COMMON_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_ |
OLD | NEW |