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 #include "ipc/ipc_channel_mojo.h" | 5 #include "ipc/ipc_channel_mojo.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 class MojoChannelFactory : public ChannelFactory { | 47 class MojoChannelFactory : public ChannelFactory { |
48 public: | 48 public: |
49 MojoChannelFactory( | 49 MojoChannelFactory( |
50 mojo::ScopedMessagePipeHandle handle, | 50 mojo::ScopedMessagePipeHandle handle, |
51 Channel::Mode mode, | 51 Channel::Mode mode, |
52 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) | 52 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) |
53 : handle_(std::move(handle)), | 53 : handle_(std::move(handle)), |
54 mode_(mode), | 54 mode_(mode), |
55 ipc_task_runner_(ipc_task_runner) {} | 55 ipc_task_runner_(ipc_task_runner) {} |
56 | 56 |
57 std::string GetName() const override { return ""; } | |
58 | |
59 std::unique_ptr<Channel> BuildChannel(Listener* listener) override { | 57 std::unique_ptr<Channel> BuildChannel(Listener* listener) override { |
60 return ChannelMojo::Create( | 58 return ChannelMojo::Create( |
61 std::move(handle_), mode_, listener, ipc_task_runner_); | 59 std::move(handle_), mode_, listener, ipc_task_runner_); |
62 } | 60 } |
63 | 61 |
64 scoped_refptr<base::SingleThreadTaskRunner> GetIPCTaskRunner() override { | 62 scoped_refptr<base::SingleThreadTaskRunner> GetIPCTaskRunner() override { |
65 return ipc_task_runner_; | 63 return ipc_task_runner_; |
66 } | 64 } |
67 | 65 |
68 private: | 66 private: |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 471 } |
474 | 472 |
475 void ChannelMojo::GetGenericRemoteAssociatedInterface( | 473 void ChannelMojo::GetGenericRemoteAssociatedInterface( |
476 const std::string& name, | 474 const std::string& name, |
477 mojo::ScopedInterfaceEndpointHandle handle) { | 475 mojo::ScopedInterfaceEndpointHandle handle) { |
478 if (message_reader_) | 476 if (message_reader_) |
479 message_reader_->GetRemoteInterface(name, std::move(handle)); | 477 message_reader_->GetRemoteInterface(name, std::move(handle)); |
480 } | 478 } |
481 | 479 |
482 } // namespace IPC | 480 } // namespace IPC |
OLD | NEW |