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_LIB_CALLBACK_BINDER_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CALLBACK_BINDER_H_ |
6 #define SERVICES_SHELL_PUBLIC_CPP_LIB_CALLBACK_BINDER_H_ | 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CALLBACK_BINDER_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "mojo/public/cpp/bindings/interface_request.h" | 11 #include "mojo/public/cpp/bindings/interface_request.h" |
12 #include "services/shell/public/cpp/interface_binder.h" | 12 #include "services/service_manager/public/cpp/interface_binder.h" |
13 | 13 |
14 namespace shell { | 14 namespace shell { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 template <typename Interface> | 17 template <typename Interface> |
18 class CallbackBinder : public InterfaceBinder { | 18 class CallbackBinder : public InterfaceBinder { |
19 public: | 19 public: |
20 // Method that binds a request for Interface. | 20 // Method that binds a request for Interface. |
21 using BindCallback = | 21 using BindCallback = |
22 base::Callback<void(mojo::InterfaceRequest<Interface>)>; | 22 base::Callback<void(mojo::InterfaceRequest<Interface>)>; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 mojo::ScopedMessagePipeHandle client_handle); | 76 mojo::ScopedMessagePipeHandle client_handle); |
77 | 77 |
78 const BindCallback callback_; | 78 const BindCallback callback_; |
79 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 79 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
80 DISALLOW_COPY_AND_ASSIGN(GenericCallbackBinder); | 80 DISALLOW_COPY_AND_ASSIGN(GenericCallbackBinder); |
81 }; | 81 }; |
82 | 82 |
83 } // namespace internal | 83 } // namespace internal |
84 } // namespace shell | 84 } // namespace shell |
85 | 85 |
86 #endif // SERVICES_SHELL_PUBLIC_CPP_LIB_CALLBACK_BINDER_H_ | 86 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CALLBACK_BINDER_H_ |
OLD | NEW |