| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun(). | 202 // ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun(). |
| 203 if (!in_browser_process_) | 203 if (!in_browser_process_) |
| 204 media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid()); | 204 media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid()); |
| 205 #endif | 205 #endif |
| 206 // We don't want to process any incoming interface requests until | 206 // We don't want to process any incoming interface requests until |
| 207 // OnInitialize() is invoked. | 207 // OnInitialize() is invoked. |
| 208 GetInterfaceRegistry()->PauseBinding(); | 208 GetInterfaceRegistry()->PauseBinding(); |
| 209 | 209 |
| 210 if (GetContentClient()->gpu()) // NULL in tests. | 210 if (GetContentClient()->gpu()) // NULL in tests. |
| 211 GetContentClient()->gpu()->Initialize(this); | 211 GetContentClient()->gpu()->Initialize(this); |
| 212 channel()->AddAssociatedInterface(base::Bind( | |
| 213 &GpuChildThread::CreateGpuMainService, base::Unretained(this))); | |
| 214 } | 212 } |
| 215 | 213 |
| 216 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name, | 214 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name, |
| 217 const std::string& group_name) { | 215 const std::string& group_name) { |
| 218 Send(new GpuHostMsg_FieldTrialActivated(trial_name)); | 216 Send(new GpuHostMsg_FieldTrialActivated(trial_name)); |
| 219 } | 217 } |
| 220 | 218 |
| 221 void GpuChildThread::CreateGpuMainService( | 219 void GpuChildThread::CreateGpuMainService( |
| 222 ui::mojom::GpuMainAssociatedRequest request) { | 220 ui::mojom::GpuMainAssociatedRequest request) { |
| 223 // TODO(sad): Implement. | 221 // TODO(sad): Implement. |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 527 |
| 530 void GpuChildThread::BindServiceFactoryRequest( | 528 void GpuChildThread::BindServiceFactoryRequest( |
| 531 service_manager::mojom::ServiceFactoryRequest request) { | 529 service_manager::mojom::ServiceFactoryRequest request) { |
| 532 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; | 530 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; |
| 533 DCHECK(service_factory_); | 531 DCHECK(service_factory_); |
| 534 service_factory_bindings_.AddBinding(service_factory_.get(), | 532 service_factory_bindings_.AddBinding(service_factory_.get(), |
| 535 std::move(request)); | 533 std::move(request)); |
| 536 } | 534 } |
| 537 | 535 |
| 538 } // namespace content | 536 } // namespace content |
| OLD | NEW |