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

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

Issue 2741343003: Update liftetime management of GpuClient (Closed)
Patch Set: fix x11 re-definition 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
« no previous file with comments | « services/ui/ws/gpu_client.cc ('k') | services/ui/ws/gpu_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/gpu_host.h
diff --git a/services/ui/ws/gpu_host.h b/services/ui/ws/gpu_host.h
index d967b06cdce37634c8a4c375ed33a94042e0f851..247ff63ce9aaa353a12fe6609deb5443a1f9009c 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:
@@ -75,6 +85,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);
};
« no previous file with comments | « services/ui/ws/gpu_client.cc ('k') | services/ui/ws/gpu_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698