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