OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "mojo/public/cpp/bindings/callback.h" | 16 #include "mojo/public/cpp/bindings/callback.h" |
17 #include "mojo/public/cpp/bindings/interface_ptr_info.h" | 17 #include "mojo/public/cpp/bindings/interface_ptr_info.h" |
18 #include "mojo/public/cpp/bindings/lib/interface_ptr_state.h" | 18 #include "mojo/public/cpp/bindings/lib/interface_ptr_state.h" |
19 | 19 |
20 namespace mojo { | 20 namespace mojo { |
21 | 21 |
22 class AssociatedGroup; | 22 class AssociatedGroup; |
23 | 23 |
24 // A pointer to a local proxy of a remote Interface implementation. Uses a | 24 // A pointer to a local proxy of a remote Interface implementation. Uses a |
25 // message pipe to communicate with the remote implementation, and automatically | 25 // message pipe to communicate with the remote implementation, and automatically |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 base::ThreadTaskRunnerHandle::Get()) { | 224 base::ThreadTaskRunnerHandle::Get()) { |
225 InterfacePtr<Interface> ptr; | 225 InterfacePtr<Interface> ptr; |
226 if (info.is_valid()) | 226 if (info.is_valid()) |
227 ptr.Bind(std::move(info), std::move(runner)); | 227 ptr.Bind(std::move(info), std::move(runner)); |
228 return std::move(ptr); | 228 return std::move(ptr); |
229 } | 229 } |
230 | 230 |
231 } // namespace mojo | 231 } // namespace mojo |
232 | 232 |
233 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ | 233 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ |
OLD | NEW |