| Index: content/common/gpu/gpu_channel.h
 | 
| ===================================================================
 | 
| --- content/common/gpu/gpu_channel.h	(revision 92876)
 | 
| +++ content/common/gpu/gpu_channel.h	(working copy)
 | 
| @@ -6,6 +6,7 @@
 | 
|  #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_
 | 
|  #pragma once
 | 
|  
 | 
| +#include <queue>
 | 
|  #include <set>
 | 
|  #include <string>
 | 
|  #include <vector>
 | 
| @@ -78,6 +79,15 @@
 | 
|    // IPC::Message::Sender implementation:
 | 
|    virtual bool Send(IPC::Message* msg);
 | 
|  
 | 
| +  // Whether this channel is able to handle IPC messages.
 | 
| +  bool IsScheduled();
 | 
| +
 | 
| +  // This is called when a command buffer transitions from the unscheduled
 | 
| +  // state to the scheduled state, which potentially means the channel
 | 
| +  // transitions from the unscheduled to the scheduled state. When this occurs
 | 
| +  // deferred IPC messaged are handled.
 | 
| +  void OnScheduled();
 | 
| +
 | 
|    void CreateViewCommandBuffer(
 | 
|        gfx::PluginWindowHandle window,
 | 
|        int32 render_view_id,
 | 
| @@ -131,6 +141,8 @@
 | 
|  
 | 
|    bool OnControlMessageReceived(const IPC::Message& msg);
 | 
|  
 | 
| +  void HandleDeferredMessages();
 | 
| +
 | 
|    int GenerateRouteID();
 | 
|  
 | 
|    // Message handlers.
 | 
| @@ -138,11 +150,11 @@
 | 
|    void OnCreateOffscreenCommandBuffer(
 | 
|        const gfx::Size& size,
 | 
|        const GPUCreateCommandBufferConfig& init_params,
 | 
| -      int32* route_id);
 | 
| -  void OnDestroyCommandBuffer(int32 route_id);
 | 
| +      IPC::Message* reply_message);
 | 
| +  void OnDestroyCommandBuffer(int32 route_id, IPC::Message* reply_message);
 | 
|  
 | 
|    void OnCreateOffscreenSurface(const gfx::Size& size,
 | 
| -                                int* route_id);
 | 
| +                                IPC::Message* reply_message);
 | 
|    void OnDestroySurface(int route_id);
 | 
|  
 | 
|    void OnCreateTransportTexture(int32 context_route_id, int32 host_id);
 | 
| @@ -154,6 +166,8 @@
 | 
|  
 | 
|    scoped_ptr<IPC::SyncChannel> channel_;
 | 
|  
 | 
| +  std::queue<IPC::Message*> deferred_messages_;
 | 
| +
 | 
|    // The id of the renderer who is on the other side of the channel.
 | 
|    int renderer_id_;
 | 
|  
 | 
| @@ -188,6 +202,8 @@
 | 
|    gpu::gles2::DisallowedExtensions disallowed_extensions_;
 | 
|    GpuWatchdog* watchdog_;
 | 
|  
 | 
| +  ScopedRunnableMethodFactory<GpuChannel> task_factory_;
 | 
| +
 | 
|    DISALLOW_COPY_AND_ASSIGN(GpuChannel);
 | 
|  };
 | 
|  
 | 
| 
 |