| Index: chrome/browser/gpu_process_host_ui_shim.h
|
| diff --git a/chrome/browser/gpu_process_host_ui_shim.h b/chrome/browser/gpu_process_host_ui_shim.h
|
| index a47e2e6da1b564c252b5d67cc8bcfb09c776fc8e..ce706e88ecb93149ce1d5eb9deeaa4e54fb00de0 100644
|
| --- a/chrome/browser/gpu_process_host_ui_shim.h
|
| +++ b/chrome/browser/gpu_process_host_ui_shim.h
|
| @@ -11,10 +11,12 @@
|
| // portion of this class, the GpuProcessHost, is responsible for
|
| // shuttling messages between the browser and GPU processes.
|
|
|
| +#include <map>
|
| #include <queue>
|
|
|
| #include "base/callback.h"
|
| #include "base/linked_ptr.h"
|
| +#include "base/ref_counted.h"
|
| #include "base/scoped_ptr.h"
|
| #include "base/singleton.h"
|
| #include "base/values.h"
|
| @@ -40,6 +42,8 @@ struct ChannelHandle;
|
| class Message;
|
| }
|
|
|
| +class RenderWidgetHostView;
|
| +
|
| class GpuProcessHostUIShim : public IPC::Channel::Sender,
|
| public IPC::Channel::Listener,
|
| public base::NonThreadSafe {
|
| @@ -173,6 +177,25 @@ class GpuProcessHostUIShim : public IPC::Channel::Sender,
|
| std::queue<linked_ptr<CreateCommandBufferCallback> >
|
| create_command_buffer_requests_;
|
|
|
| + typedef std::pair<int32 /* renderer_id */,
|
| + int32 /* render_view_id */> ViewID;
|
| +
|
| + // Encapsulates surfaces that we acquire when creating view command buffers.
|
| + // We assume that a render view has at most 1 such surface associated
|
| + // with it.
|
| + class ViewSurface : public base::RefCounted<ViewSurface> {
|
| + public:
|
| + explicit ViewSurface(ViewID view_id);
|
| + ~ViewSurface();
|
| + gfx::PluginWindowHandle surface() { return surface_; }
|
| + private:
|
| + RenderWidgetHostView* GetRenderWidgetHostView();
|
| + ViewID view_id_;
|
| + gfx::PluginWindowHandle surface_;
|
| + };
|
| +
|
| + std::map<ViewID, scoped_refptr<ViewSurface> > acquired_surfaces_;
|
| +
|
| bool initialized_;
|
| bool initialized_successfully_;
|
|
|
|
|