OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gpu/gpu_child_thread.h" | 5 #include "content/gpu/gpu_child_thread.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 private: | 83 private: |
84 struct PendingRequest { | 84 struct PendingRequest { |
85 service_manager::Identity source_identity; | 85 service_manager::Identity source_identity; |
86 std::string interface_name; | 86 std::string interface_name; |
87 mojo::ScopedMessagePipeHandle interface_pipe; | 87 mojo::ScopedMessagePipeHandle interface_pipe; |
88 }; | 88 }; |
89 | 89 |
90 // ConnectionFilter: | 90 // ConnectionFilter: |
91 void OnBindInterface(const service_manager::ServiceInfo& source_info, | 91 void OnBindInterface(const service_manager::BindSourceInfo& source_info, |
92 const std::string& interface_name, | 92 const std::string& interface_name, |
93 mojo::ScopedMessagePipeHandle* interface_pipe, | 93 mojo::ScopedMessagePipeHandle* interface_pipe, |
94 service_manager::Connector* connector) override { | 94 service_manager::Connector* connector) override { |
95 DCHECK(io_thread_checker_.CalledOnValidThread()); | 95 DCHECK(io_thread_checker_.CalledOnValidThread()); |
96 if (registry_->CanBindInterface(interface_name)) { | 96 if (registry_->CanBindInterface(interface_name)) { |
97 if (released_) { | 97 if (released_) { |
98 registry_->BindInterface(source_info.identity, interface_name, | 98 registry_->BindInterface(source_info.identity, interface_name, |
99 std::move(*interface_pipe)); | 99 std::move(*interface_pipe)); |
100 } else { | 100 } else { |
101 std::unique_ptr<PendingRequest> request = | 101 std::unique_ptr<PendingRequest> request = |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 void GpuChildThread::BindServiceFactoryRequest( | 299 void GpuChildThread::BindServiceFactoryRequest( |
300 service_manager::mojom::ServiceFactoryRequest request) { | 300 service_manager::mojom::ServiceFactoryRequest request) { |
301 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; | 301 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; |
302 DCHECK(service_factory_); | 302 DCHECK(service_factory_); |
303 service_factory_bindings_.AddBinding(service_factory_.get(), | 303 service_factory_bindings_.AddBinding(service_factory_.get(), |
304 std::move(request)); | 304 std::move(request)); |
305 } | 305 } |
306 | 306 |
307 } // namespace content | 307 } // namespace content |
OLD | NEW |