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

Unified Diff: content/browser/gpu/gpu_process_host.h

Issue 2805623002: gpu: Notify callbacks the reason for channel creation failure (Closed)
Patch Set: . Created 3 years, 8 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: content/browser/gpu/gpu_process_host.h
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index f8729382db29be6454b54165a11e85b854d35556..bd145f099ec17eb34b4df12e25bf87bf650c91ac 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -66,8 +66,18 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
GPU_PROCESS_KIND_COUNT
};
- typedef base::Callback<void(const IPC::ChannelHandle&, const gpu::GPUInfo&)>
- EstablishChannelCallback;
+ enum class EstablishChannelStatus {
+ GPU_ACCESS_DENIED, // GPU access was not allowed.
+ GPU_HOST_INVALID, // Request failed because the gpu host became invalid
+ // while processing the request (e.g. the gpu process may
+ // have been killed). The caller should normally make
+ // another request to establish a new channel.
+ SUCCESS
+ };
+ using EstablishChannelCallback =
+ base::Callback<void(const IPC::ChannelHandle&,
+ const gpu::GPUInfo&,
+ EstablishChannelStatus status)>;
typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
CreateGpuMemoryBufferCallback;

Powered by Google App Engine
This is Rietveld 408576698