| Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
 | 
| diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
 | 
| index 075c8f993f5da2332a185895ee210b8e68d8155c..c2cb27881888df33fb959f652e9642995eca7494 100644
 | 
| --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
 | 
| +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
 | 
| @@ -393,6 +393,52 @@ scoped_ptr<gfx::GpuMemoryBuffer>
 | 
|    return buffer.PassAs<gfx::GpuMemoryBuffer>();
 | 
|  }
 | 
|  
 | 
| +void BrowserGpuChannelHostFactory::CreateSurfaceTextureOnIO(
 | 
| +    int32 surface_texture_id,
 | 
| +    base::ProcessHandle process_handle,
 | 
| +    const CreateSurfaceTextureCallback& callback) {
 | 
| +  GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_);
 | 
| +  if (!host) {
 | 
| +    SurfaceTextureCreatedOnIO(callback);
 | 
| +    return;
 | 
| +  }
 | 
| +
 | 
| +  host->CreateSurfaceTexture(
 | 
| +      surface_texture_id,
 | 
| +      process_handle,
 | 
| +      base::Bind(&BrowserGpuChannelHostFactory::SurfaceTextureCreatedOnIO,
 | 
| +                 callback));
 | 
| +}
 | 
| +
 | 
| +// static
 | 
| +void BrowserGpuChannelHostFactory::SurfaceTextureCreatedOnIO(
 | 
| +    const CreateSurfaceTextureCallback& callback) {
 | 
| +  BrowserThread::PostTask(
 | 
| +      BrowserThread::UI,
 | 
| +      FROM_HERE,
 | 
| +      base::Bind(&BrowserGpuChannelHostFactory::OnSurfaceTextureCreated,
 | 
| +                 callback));
 | 
| +}
 | 
| +
 | 
| +// static
 | 
| +void BrowserGpuChannelHostFactory::OnSurfaceTextureCreated(
 | 
| +    const CreateSurfaceTextureCallback& callback) {
 | 
| +  callback.Run();
 | 
| +}
 | 
| +
 | 
| +void BrowserGpuChannelHostFactory::CreateSurfaceTexture(
 | 
| +    int32 surface_texture_id,
 | 
| +    base::ProcessHandle process_handle,
 | 
| +    const CreateSurfaceTextureCallback& callback) {
 | 
| +  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 | 
| +  GetIOLoopProxy()->PostTask(FROM_HERE, base::Bind(
 | 
| +        &BrowserGpuChannelHostFactory::CreateSurfaceTextureOnIO,
 | 
| +        base::Unretained(this),
 | 
| +        surface_texture_id,
 | 
| +        process_handle,
 | 
| +        callback));
 | 
| +}
 | 
| +
 | 
|  // static
 | 
|  void BrowserGpuChannelHostFactory::AddFilterOnIO(
 | 
|      int host_id,
 | 
| 
 |