Commit b36c0cb2 authored by sky's avatar sky Committed by Commit bot

Changes GpuServiceInternal from Binding to BindingSet

StrongBinding means GpuServiceInternal is deleted when the pipe is
closed, defeating the singleton nature. By converting to Binding when the pipe is closed GpuServiceInternal is not deleted.

BUG=none
TEST=none
R=sadrul@chromium.org

Review-Url: https://codereview.chromium.org/2302523002
Cr-Commit-Position: refs/heads/master@{#415763}
parent f2e5768a
...@@ -63,6 +63,7 @@ GpuServiceInternal::~GpuServiceInternal() { ...@@ -63,6 +63,7 @@ GpuServiceInternal::~GpuServiceInternal() {
} }
void GpuServiceInternal::Add(mojom::GpuServiceInternalRequest request) { void GpuServiceInternal::Add(mojom::GpuServiceInternalRequest request) {
binding_.Close();
binding_.Bind(std::move(request)); binding_.Bind(std::move(request));
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "gpu/ipc/service/gpu_channel_manager_delegate.h" #include "gpu/ipc/service/gpu_channel_manager_delegate.h"
#include "gpu/ipc/service/gpu_config.h" #include "gpu/ipc/service/gpu_config.h"
#include "gpu/ipc/service/x_util.h" #include "gpu/ipc/service/x_util.h"
#include "mojo/public/cpp/bindings/strong_binding.h" #include "mojo/public/cpp/bindings/binding.h"
#include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h" #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
...@@ -153,7 +153,7 @@ class GpuServiceInternal : public gpu::GpuChannelManagerDelegate, ...@@ -153,7 +153,7 @@ class GpuServiceInternal : public gpu::GpuChannelManagerDelegate,
// Information about the GPU, such as device and vendor ID. // Information about the GPU, such as device and vendor ID.
gpu::GPUInfo gpu_info_; gpu::GPUInfo gpu_info_;
mojo::StrongBinding<mojom::GpuServiceInternal> binding_; mojo::Binding<mojom::GpuServiceInternal> binding_;
DISALLOW_COPY_AND_ASSIGN(GpuServiceInternal); DISALLOW_COPY_AND_ASSIGN(GpuServiceInternal);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment