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

Unified Diff: services/ui/ws/gpu_host.h

Issue 2741343003: Update liftetime management of GpuClient (Closed)
Patch Set: Update Deps. Remove Test Filter Created 3 years, 9 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
Index: services/ui/ws/gpu_host.h
diff --git a/services/ui/ws/gpu_host.h b/services/ui/ws/gpu_host.h
index b937266a5cc7136b079d451ae36d421b6797c376..814ed867734749f9c6d972d3d50986715ea1ecec 100644
--- a/services/ui/ws/gpu_host.h
+++ b/services/ui/ws/gpu_host.h
@@ -12,6 +12,7 @@
#include "gpu/ipc/client/gpu_channel_host.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/bindings/strong_binding_set.h"
#include "services/ui/gpu/gpu_main.h"
#include "services/ui/gpu/interfaces/gpu_host.mojom.h"
#include "services/ui/gpu/interfaces/gpu_service.mojom.h"
@@ -23,6 +24,12 @@ class ServerGpuMemoryBufferManager;
namespace ws {
+class GpuClient;
+
+namespace test {
+class GpuHostTest;
+} // namespace test
+
class GpuHostDelegate;
// Sets up connection from clients to the real service implementation in the GPU
@@ -42,6 +49,9 @@ class GpuHost : public mojom::GpuHost {
cc::mojom::DisplayCompositorClientPtr client);
private:
+ friend class test::GpuHostTest;
+
+ GpuClient* AddInternal(mojom::GpuRequest request);
void OnBadMessageFromGpu();
// mojom::GpuHost:
@@ -72,6 +82,8 @@ class GpuHost : public mojom::GpuHost {
// because that will live in another process soon.
std::unique_ptr<GpuMain> gpu_main_impl_;
+ mojo::StrongBindingSet<mojom::Gpu> gpu_bindings_;
+
DISALLOW_COPY_AND_ASSIGN(GpuHost);
};

Powered by Google App Engine
This is Rietveld 408576698