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 SERVICES_SHELL_PUBLIC_CPP_INTERFACE_PROVIDER_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_INTERFACE_PROVIDER_H_ |
6 #define SERVICES_SHELL_PUBLIC_CPP_INTERFACE_PROVIDER_H_ | 6 #define SERVICES_SHELL_PUBLIC_CPP_INTERFACE_PROVIDER_H_ |
7 | 7 |
8 #include "services/shell/public/interfaces/interface_provider.mojom.h" | 8 #include "services/shell/public/interfaces/interface_provider.mojom.h" |
9 | 9 |
10 namespace shell { | 10 namespace shell { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& binder) { | 74 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& binder) { |
75 binders_[name] = binder; | 75 binders_[name] = binder; |
76 } | 76 } |
77 void ClearBinders(); | 77 void ClearBinders(); |
78 | 78 |
79 using BinderMap = std::map< | 79 using BinderMap = std::map< |
80 std::string, base::Callback<void(mojo::ScopedMessagePipeHandle)>>; | 80 std::string, base::Callback<void(mojo::ScopedMessagePipeHandle)>>; |
81 BinderMap binders_; | 81 BinderMap binders_; |
82 | 82 |
83 mojom::InterfaceProviderPtr interface_provider_; | 83 mojom::InterfaceProviderPtr interface_provider_; |
84 mojom::InterfaceProviderRequest pending_request_; | |
85 | 84 |
86 base::WeakPtrFactory<InterfaceProvider> weak_factory_; | 85 base::WeakPtrFactory<InterfaceProvider> weak_factory_; |
87 | 86 |
88 DISALLOW_COPY_AND_ASSIGN(InterfaceProvider); | 87 DISALLOW_COPY_AND_ASSIGN(InterfaceProvider); |
89 }; | 88 }; |
90 | 89 |
91 } // namespace shell | 90 } // namespace shell |
92 | 91 |
93 #endif // SERVICES_SHELL_PUBLIC_CPP_INTERFACE_PROVIDER_H_ | 92 #endif // SERVICES_SHELL_PUBLIC_CPP_INTERFACE_PROVIDER_H_ |
OLD | NEW |