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

Side by Side Diff: services/ui/gpu/gpu_service_internal.cc

Issue 2302523002: Changes GpuServiceInternal from StrongBinding to Binding (Closed)
Patch Set: binding Created 4 years, 3 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 | « services/ui/gpu/gpu_service_internal.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "services/ui/gpu/gpu_service_internal.h" 5 #include "services/ui/gpu/gpu_service_internal.h"
6 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 GpuServiceInternal::~GpuServiceInternal() { 56 GpuServiceInternal::~GpuServiceInternal() {
57 // Signal this event before destroying the child process. That way all 57 // Signal this event before destroying the child process. That way all
58 // background threads can cleanup. 58 // background threads can cleanup.
59 // For example, in the renderer the RenderThread instances will be able to 59 // For example, in the renderer the RenderThread instances will be able to
60 // notice shutdown before the render process begins waiting for them to exit. 60 // notice shutdown before the render process begins waiting for them to exit.
61 shutdown_event_.Signal(); 61 shutdown_event_.Signal();
62 io_thread_.Stop(); 62 io_thread_.Stop();
63 } 63 }
64 64
65 void GpuServiceInternal::Add(mojom::GpuServiceInternalRequest request) { 65 void GpuServiceInternal::Add(mojom::GpuServiceInternalRequest request) {
66 binding_.Close();
sadrul 2016/08/31 19:12:32 I seem to remember someone mentioning explicit Clo
66 binding_.Bind(std::move(request)); 67 binding_.Bind(std::move(request));
67 } 68 }
68 69
69 void GpuServiceInternal::EstablishGpuChannelInternal( 70 void GpuServiceInternal::EstablishGpuChannelInternal(
70 int32_t client_id, 71 int32_t client_id,
71 uint64_t client_tracing_id, 72 uint64_t client_tracing_id,
72 bool preempts, 73 bool preempts,
73 bool allow_view_command_buffers, 74 bool allow_view_command_buffers,
74 bool allow_real_time_streams, 75 bool allow_real_time_streams,
75 const EstablishGpuChannelCallback& callback) { 76 const EstablishGpuChannelCallback& callback) {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 allow_real_time_streams, callback); 252 allow_real_time_streams, callback);
252 } 253 }
253 254
254 // static 255 // static
255 GpuServiceInternal* GpuServiceInternal::GetInstance() { 256 GpuServiceInternal* GpuServiceInternal::GetInstance() {
256 return base::Singleton<GpuServiceInternal, 257 return base::Singleton<GpuServiceInternal,
257 base::LeakySingletonTraits<GpuServiceInternal>>::get(); 258 base::LeakySingletonTraits<GpuServiceInternal>>::get();
258 } 259 }
259 260
260 } // namespace ui 261 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/gpu/gpu_service_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698