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

Unified Diff: services/ui/public/cpp/gpu/gpu.h

Issue 2965103002: gpu: Make the mus-gpu client-lib test-friendly. (Closed)
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | services/ui/public/cpp/gpu/gpu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/gpu/gpu.h
diff --git a/services/ui/public/cpp/gpu/gpu.h b/services/ui/public/cpp/gpu/gpu.h
index 2ca485288ed24110349a59108b447ddf90482db9..4b506e2466ab2f4d0e198012eca9eea0bb50ec7d 100644
--- a/services/ui/public/cpp/gpu/gpu.h
+++ b/services/ui/public/cpp/gpu/gpu.h
@@ -51,10 +51,10 @@ class Gpu : public gpu::GpuChannelHostFactory,
gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
private:
- friend struct base::DefaultSingletonTraits<Gpu>;
+ friend class GpuTest;
- Gpu(service_manager::Connector* connector,
- const std::string& service_name,
+ using GpuPtrFactory = base::RepeatingCallback<mojom::GpuPtr(void)>;
+ Gpu(GpuPtrFactory factory,
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
scoped_refptr<gpu::GpuChannelHost> GetGpuChannel();
@@ -70,8 +70,7 @@ class Gpu : public gpu::GpuChannelHostFactory,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
- service_manager::Connector* connector_;
- const std::string service_name_;
+ GpuPtrFactory factory_;
base::WaitableEvent shutdown_event_;
std::unique_ptr<base::Thread> io_thread_;
std::unique_ptr<ClientGpuMemoryBufferManager> gpu_memory_buffer_manager_;
« no previous file with comments | « no previous file | services/ui/public/cpp/gpu/gpu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698