Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 2625933002: content/gpu: Set up a mojom connection between browser and gpu. (Closed)
Patch Set: tot merge Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | content/public/app/mojo/content_gpu_manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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)));
212 } 214 }
213 215
214 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name, 216 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name,
215 const std::string& group_name) { 217 const std::string& group_name) {
216 Send(new GpuHostMsg_FieldTrialActivated(trial_name)); 218 Send(new GpuHostMsg_FieldTrialActivated(trial_name));
217 } 219 }
218 220
221 void GpuChildThread::CreateGpuMainService(
222 ui::mojom::GpuMainAssociatedRequest request) {
223 // TODO(sad): Implement.
224 }
225
219 bool GpuChildThread::Send(IPC::Message* msg) { 226 bool GpuChildThread::Send(IPC::Message* msg) {
220 // The GPU process must never send a synchronous IPC message to the browser 227 // The GPU process must never send a synchronous IPC message to the browser
221 // process. This could result in deadlock. 228 // process. This could result in deadlock.
222 DCHECK(!msg->is_sync()); 229 DCHECK(!msg->is_sync());
223 230
224 return ChildThreadImpl::Send(msg); 231 return ChildThreadImpl::Send(msg);
225 } 232 }
226 233
227 bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) { 234 bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
228 bool handled = true; 235 bool handled = true;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 529
523 void GpuChildThread::BindServiceFactoryRequest( 530 void GpuChildThread::BindServiceFactoryRequest(
524 service_manager::mojom::ServiceFactoryRequest request) { 531 service_manager::mojom::ServiceFactoryRequest request) {
525 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; 532 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest";
526 DCHECK(service_factory_); 533 DCHECK(service_factory_);
527 service_factory_bindings_.AddBinding(service_factory_.get(), 534 service_factory_bindings_.AddBinding(service_factory_.get(),
528 std::move(request)); 535 std::move(request));
529 } 536 }
530 537
531 } // namespace content 538 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | content/public/app/mojo/content_gpu_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698