Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_INTERFACE_BINDER_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_INTERFACE_BINDER_H_ |
| 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_INTERFACE_BINDER_H_ | 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_INTERFACE_BINDER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 mojo::ScopedMessagePipeHandle handle) override; | 82 mojo::ScopedMessagePipeHandle handle) override; |
| 83 | 83 |
| 84 static void RunCallback(const BindCallback& callback, | 84 static void RunCallback(const BindCallback& callback, |
| 85 mojo::ScopedMessagePipeHandle client_handle); | 85 mojo::ScopedMessagePipeHandle client_handle); |
| 86 | 86 |
| 87 const BindCallback callback_; | 87 const BindCallback callback_; |
| 88 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 88 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 89 DISALLOW_COPY_AND_ASSIGN(GenericCallbackBinder); | 89 DISALLOW_COPY_AND_ASSIGN(GenericCallbackBinder); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 class FullCallbackBinder : public InterfaceBinder { | |
|
Ken Rockot(use gerrit already)
2017/05/11 02:32:08
Could you please just modify GenericCallbackBinder
leonhsl(Using Gerrit)
2017/05/11 03:10:04
Done. Thank you very much! I should have done such
| |
| 93 public: | |
| 94 using BindCallback = base::Callback<void(const BindSourceInfo&, | |
| 95 const std::string&, | |
| 96 mojo::ScopedMessagePipeHandle)>; | |
| 97 | |
| 98 FullCallbackBinder( | |
| 99 const BindCallback& callback, | |
| 100 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | |
| 101 ~FullCallbackBinder() override; | |
| 102 | |
| 103 private: | |
| 104 // InterfaceBinder: | |
| 105 void BindInterface(const BindSourceInfo& source_info, | |
| 106 const std::string& interface_name, | |
| 107 mojo::ScopedMessagePipeHandle handle) override; | |
| 108 | |
| 109 static void RunCallback(const BindCallback& callback, | |
| 110 const BindSourceInfo& source_info, | |
| 111 const std::string& interface_name, | |
| 112 mojo::ScopedMessagePipeHandle client_handle); | |
| 113 | |
| 114 const BindCallback callback_; | |
| 115 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | |
| 116 DISALLOW_COPY_AND_ASSIGN(FullCallbackBinder); | |
| 117 }; | |
| 118 | |
| 92 } // namespace service_manager | 119 } // namespace service_manager |
| 93 | 120 |
| 94 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_INTERFACE_BINDER_H_ | 121 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_INTERFACE_BINDER_H_ |
| OLD | NEW |