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

Side by Side Diff: services/ui/public/cpp/gpu_service.h

Issue 2247183005: services/ui: Get rid of IPC::ChannelHandle type converter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review issues Created 4 years, 4 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_mus.cc ('k') | services/ui/public/cpp/gpu_service.cc » ('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 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 #ifndef SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_
6 #define SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_ 6 #define SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 friend struct base::DefaultSingletonTraits<GpuService>; 48 friend struct base::DefaultSingletonTraits<GpuService>;
49 49
50 explicit GpuService(shell::Connector* connector); 50 explicit GpuService(shell::Connector* connector);
51 51
52 scoped_refptr<gpu::GpuChannelHost> GetGpuChannelLocked(); 52 scoped_refptr<gpu::GpuChannelHost> GetGpuChannelLocked();
53 void EstablishGpuChannelOnMainThread(); 53 void EstablishGpuChannelOnMainThread();
54 void EstablishGpuChannelOnMainThreadSyncLocked(); 54 void EstablishGpuChannelOnMainThreadSyncLocked();
55 void EstablishGpuChannelOnMainThreadDone( 55 void EstablishGpuChannelOnMainThreadDone(
56 bool locked, 56 bool locked,
57 int client_id, 57 int client_id,
58 mojom::ChannelHandlePtr channel_handle, 58 mojo::ScopedMessagePipeHandle channel_handle,
59 const gpu::GPUInfo& gpu_info); 59 const gpu::GPUInfo& gpu_info);
60 60
61 // gpu::GpuChannelHostFactory overrides: 61 // gpu::GpuChannelHostFactory overrides:
62 bool IsMainThread() override; 62 bool IsMainThread() override;
63 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 63 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
64 std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 64 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
65 size_t size) override; 65 size_t size) override;
66 66
67 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 67 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
68 shell::Connector* connector_; 68 shell::Connector* connector_;
69 base::WaitableEvent shutdown_event_; 69 base::WaitableEvent shutdown_event_;
70 base::Thread io_thread_; 70 base::Thread io_thread_;
71 std::unique_ptr<MojoGpuMemoryBufferManager> gpu_memory_buffer_manager_; 71 std::unique_ptr<MojoGpuMemoryBufferManager> gpu_memory_buffer_manager_;
72 72
73 // Lock for |gpu_channel_|, |establish_callbacks_| & |is_establishing_|. 73 // Lock for |gpu_channel_|, |establish_callbacks_| & |is_establishing_|.
74 base::Lock lock_; 74 base::Lock lock_;
75 bool is_establishing_; 75 bool is_establishing_;
76 ui::mojom::GpuServicePtr gpu_service_; 76 ui::mojom::GpuServicePtr gpu_service_;
77 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; 77 scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
78 std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_; 78 std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_;
79 base::ConditionVariable establishing_condition_; 79 base::ConditionVariable establishing_condition_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(GpuService); 81 DISALLOW_COPY_AND_ASSIGN(GpuService);
82 }; 82 };
83 83
84 } // namespace ui 84 } // namespace ui
85 85
86 #endif // SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_ 86 #endif // SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_
OLDNEW
« no previous file with comments | « services/ui/gpu/gpu_service_mus.cc ('k') | services/ui/public/cpp/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698