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

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

Issue 2696473002: gpu: Use mojom API for creating gpu channel. (Closed)
Patch Set: . Created 3 years, 10 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 | content/browser/gpu/gpu_process_host.cc » ('j') | content/browser/gpu/gpu_process_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27b5c93b0da99acdbe4470cdaea4824aa318928c..5d52b91ba33b02488e050e7a2600918a9b344db3 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -72,14 +72,6 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
typedef base::Callback<void(const IPC::ChannelHandle&, const gpu::GPUInfo&)>
EstablishChannelCallback;
- struct EstablishChannelRequest {
- EstablishChannelRequest();
- EstablishChannelRequest(const EstablishChannelRequest& other);
- ~EstablishChannelRequest();
- int32_t client_id;
- EstablishChannelCallback callback;
- };
-
typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
CreateGpuMemoryBufferCallback;
@@ -196,11 +188,14 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
const std::string& key,
const std::string& shader) override;
+ void OnChannelEstablished(int client_id,
+ const EstablishChannelCallback& callback,
+ mojo::ScopedMessagePipeHandle channel_handle);
+
// Message handlers.
void OnInitialized(bool result,
const gpu::GPUInfo& gpu_info,
const gpu::GpuFeatureInfo& gpu_feature_info);
- void OnChannelEstablished(const IPC::ChannelHandle& channel_handle);
void OnGpuMemoryBufferCreated(const gfx::GpuMemoryBufferHandle& handle);
#if defined(OS_ANDROID)
void OnDestroyingVideoSurfaceAck(int surface_id);
@@ -225,7 +220,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
// These are the channel requests that we have already sent to
// the GPU process, but haven't heard back about yet.
- std::queue<EstablishChannelRequest> channel_requests_;
+ std::queue<EstablishChannelCallback> channel_requests_;
// The pending create gpu memory buffer requests we need to reply to.
std::queue<CreateGpuMemoryBufferCallback> create_gpu_memory_buffer_requests_;
@@ -292,6 +287,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
ui::mojom::GpuServicePtr gpu_service_ptr_;
mojo::Binding<ui::mojom::GpuHost> gpu_host_binding_;
+ base::WeakPtrFactory<GpuProcessHost> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
};
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | content/browser/gpu/gpu_process_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698