| 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 #include "content/common/mojo/mojo_shell_connection_impl.h" | 5 #include "content/common/mojo/mojo_shell_connection_impl.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 void OnBrowserConnectionLost() { | 145 void OnBrowserConnectionLost() { |
| 146 DCHECK(io_thread_checker_.CalledOnValidThread()); | 146 DCHECK(io_thread_checker_.CalledOnValidThread()); |
| 147 browser_connection_ = nullptr; | 147 browser_connection_ = nullptr; |
| 148 } | 148 } |
| 149 | 149 |
| 150 ///////////////////////////////////////////////////////////////////////////// | 150 ///////////////////////////////////////////////////////////////////////////// |
| 151 // shell::Service implementation | 151 // shell::Service implementation |
| 152 | 152 |
| 153 void OnStart(shell::Connector* connector, | 153 void OnStart(const shell::Identity& identity) override { |
| 154 const shell::Identity& identity, | |
| 155 uint32_t id) override { | |
| 156 DCHECK(io_thread_checker_.CalledOnValidThread()); | 154 DCHECK(io_thread_checker_.CalledOnValidThread()); |
| 157 DCHECK(!initialize_handler_.is_null()); | 155 DCHECK(!initialize_handler_.is_null()); |
| 158 | 156 |
| 159 InitializeCallback handler = base::ResetAndReturn(&initialize_handler_); | 157 InitializeCallback handler = base::ResetAndReturn(&initialize_handler_); |
| 160 callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity)); | 158 callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity)); |
| 161 } | 159 } |
| 162 | 160 |
| 163 bool OnConnect(shell::Connection* connection) override { | 161 bool OnConnect(shell::Connection* connection) override { |
| 164 DCHECK(io_thread_checker_.CalledOnValidThread()); | 162 DCHECK(io_thread_checker_.CalledOnValidThread()); |
| 165 std::string remote_app = connection->GetRemoteIdentity().name(); | 163 std::string remote_app = connection->GetRemoteIdentity().name(); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 } | 439 } |
| 442 | 440 |
| 443 void MojoShellConnectionImpl::GetInterface( | 441 void MojoShellConnectionImpl::GetInterface( |
| 444 shell::mojom::InterfaceProvider* provider, | 442 shell::mojom::InterfaceProvider* provider, |
| 445 const mojo::String& interface_name, | 443 const mojo::String& interface_name, |
| 446 mojo::ScopedMessagePipeHandle request_handle) { | 444 mojo::ScopedMessagePipeHandle request_handle) { |
| 447 provider->GetInterface(interface_name, std::move(request_handle)); | 445 provider->GetInterface(interface_name, std::move(request_handle)); |
| 448 } | 446 } |
| 449 | 447 |
| 450 } // namespace content | 448 } // namespace content |
| OLD | NEW |