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

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

Issue 8887001: Remove custom Task implementations and re-exorcise old callbacks from gpu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base::IgnoreResult instead of base::IgnoreReturn Created 9 years 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') | no next file with comments »
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 9940b69b8bbe4c2d88fa46ebcc45204c9e687574..dfb069a11f2702d987009cda003c1aa6c12e96cb 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -9,7 +9,7 @@
#include <map>
#include <queue>
-#include "base/callback_old.h"
+#include "base/callback.h"
#include "base/memory/linked_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "content/browser/browser_child_process_host.h"
@@ -58,18 +58,18 @@ class GpuProcessHost : public BrowserChildProcessHost,
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
- typedef Callback3<const IPC::ChannelHandle&,
- base::ProcessHandle,
- const content::GPUInfo&>::Type
- EstablishChannelCallback;
+ typedef base::Callback<void(const IPC::ChannelHandle&,
+ base::ProcessHandle,
+ const content::GPUInfo&)>
+ EstablishChannelCallback;
// Tells the GPU process to create a new channel for communication with a
// renderer. Once the GPU process responds asynchronously with the IPC handle
// and GPUInfo, we call the callback.
void EstablishGpuChannel(
- int renderer_id, EstablishChannelCallback* callback);
+ int renderer_id, const EstablishChannelCallback& callback);
- typedef Callback1<int32>::Type CreateCommandBufferCallback;
+ typedef base::Callback<void(int32)> CreateCommandBufferCallback;
// Tells the GPU process to create a new command buffer that draws into the
// window associated with the given renderer.
@@ -78,7 +78,7 @@ class GpuProcessHost : public BrowserChildProcessHost,
int32 render_view_id,
int32 renderer_id,
const GPUCreateCommandBufferConfig& init_params,
- CreateCommandBufferCallback* callback);
+ const CreateCommandBufferCallback& callback);
// Whether this GPU process is set up to use software rendering.
bool software_rendering();
@@ -108,11 +108,11 @@ class GpuProcessHost : public BrowserChildProcessHost,
void SendOutstandingReplies();
void EstablishChannelError(
- EstablishChannelCallback* callback,
+ const EstablishChannelCallback& callback,
const IPC::ChannelHandle& channel_handle,
base::ProcessHandle renderer_process_for_gpu,
const content::GPUInfo& gpu_info);
- void CreateCommandBufferError(CreateCommandBufferCallback* callback,
+ void CreateCommandBufferError(const CreateCommandBufferCallback& callback,
int32 route_id);
// The serial number of the GpuProcessHost / GpuProcessHostUIShim pair.
@@ -120,11 +120,10 @@ class GpuProcessHost : public BrowserChildProcessHost,
// These are the channel requests that we have already sent to
// the GPU process, but haven't heard back about yet.
- std::queue<linked_ptr<EstablishChannelCallback> > channel_requests_;
+ std::queue<EstablishChannelCallback> channel_requests_;
// The pending create command buffer requests we need to reply to.
- std::queue<linked_ptr<CreateCommandBufferCallback> >
- create_command_buffer_requests_;
+ std::queue<CreateCommandBufferCallback> create_command_buffer_requests_;
#if defined(TOOLKIT_USES_GTK)
typedef std::pair<int32 /* renderer_id */,
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698