| 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 f4661f445ed4e914f02eef9aa9ca37d144e411b3..d90b13214c3f6e6e81876aa7755551a8b4547483 100644
|
| --- a/content/browser/gpu/gpu_process_host.h
|
| +++ b/content/browser/gpu/gpu_process_host.h
|
| @@ -19,6 +19,7 @@
|
| #include "content/common/gpu/gpu_process_launch_causes.h"
|
| #include "content/public/browser/browser_child_process_host_delegate.h"
|
| #include "content/public/common/gpu_info.h"
|
| +#include "content/public/common/gpu_mem_stats.h"
|
| #include "ipc/ipc_sender.h"
|
| #include "ui/gfx/native_widget_types.h"
|
|
|
| @@ -50,6 +51,14 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
|
|
| typedef base::Callback<void(int32)> CreateCommandBufferCallback;
|
|
|
| + typedef base::Callback<void (const content::GpuMemStats& mem_stats)>
|
| + OnMemStatsCallback;
|
| +
|
| + // Specify a callback to make when an OnMemStats message is received.
|
| + // Note that this function is to be called exactly once before every
|
| + // GpuHostMsg_MemStats message from the GPU process.
|
| + void SetOnMemStatsCallback(OnMemStatsCallback callback);
|
| +
|
| static bool gpu_enabled() { return gpu_enabled_; }
|
|
|
| // Creates a new GpuProcessHost or gets an existing one, resulting in the
|
| @@ -120,6 +129,7 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
| void OnChannelEstablished(const IPC::ChannelHandle& channel_handle);
|
| void OnCommandBufferCreated(const int32 route_id);
|
| void OnDestroyCommandBuffer(int32 surface_id);
|
| + void OnMemStats(content::GpuMemStats mem_stats);
|
|
|
| #if defined(OS_MACOSX)
|
| void OnAcceleratedSurfaceBuffersSwapped(
|
| @@ -194,6 +204,8 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
|
|
| static bool hardware_gpu_enabled_;
|
|
|
| + OnMemStatsCallback on_mem_stats_callback_;
|
| +
|
| scoped_ptr<BrowserChildProcessHostImpl> process_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
|
|
|