OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ |
6 #define CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 6 #define CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <queue> | 12 #include <queue> |
13 | 13 |
14 #include "base/callback_old.h" | 14 #include "base/callback_old.h" |
15 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "content/renderer/gpu/gpu_channel_host.h" |
17 #include "content/renderer/gpu/gpu_video_decode_accelerator_host.h" | 18 #include "content/renderer/gpu/gpu_video_decode_accelerator_host.h" |
18 #include "gpu/command_buffer/common/command_buffer.h" | 19 #include "gpu/command_buffer/common/command_buffer.h" |
19 #include "ipc/ipc_channel.h" | 20 #include "ipc/ipc_channel.h" |
20 #include "ipc/ipc_message.h" | 21 #include "ipc/ipc_message.h" |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class SharedMemory; | 24 class SharedMemory; |
24 } | 25 } |
25 | 26 |
26 namespace gfx { | 27 namespace gfx { |
27 class Size; | 28 class Size; |
28 } | 29 } |
29 | 30 |
30 class PluginChannelHost; | 31 class PluginChannelHost; |
31 class Task; | 32 class Task; |
32 | 33 |
33 // Client side proxy that forwards messages synchronously to a | 34 // Client side proxy that forwards messages synchronously to a |
34 // CommandBufferStub. | 35 // CommandBufferStub. |
35 class CommandBufferProxy : public gpu::CommandBuffer, | 36 class CommandBufferProxy : public gpu::CommandBuffer, |
36 public IPC::Channel::Listener { | 37 public IPC::Channel::Listener, |
| 38 public GpuChannelHost::MessageFilter::Listener { |
37 public: | 39 public: |
38 CommandBufferProxy(IPC::Channel::Sender* channel, int route_id); | 40 CommandBufferProxy(IPC::Channel::Sender* channel, int route_id); |
39 virtual ~CommandBufferProxy(); | 41 virtual ~CommandBufferProxy(); |
40 | 42 |
41 // IPC::Channel::Listener implementation: | 43 // IPC::Channel::Listener implementation: |
42 virtual bool OnMessageReceived(const IPC::Message& message); | 44 virtual bool OnMessageReceived(const IPC::Message& message); |
43 virtual void OnChannelError(); | 45 virtual void OnChannelError(); |
44 | 46 |
45 int route_id() const { return route_id_; } | 47 int route_id() const { return route_id_; } |
46 | 48 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 134 |
133 scoped_ptr<Callback0::Type> swap_buffers_callback_; | 135 scoped_ptr<Callback0::Type> swap_buffers_callback_; |
134 scoped_ptr<Callback0::Type> channel_error_callback_; | 136 scoped_ptr<Callback0::Type> channel_error_callback_; |
135 | 137 |
136 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 138 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
137 }; | 139 }; |
138 | 140 |
139 #endif // ENABLE_GPU | 141 #endif // ENABLE_GPU |
140 | 142 |
141 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 143 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ |
OLD | NEW |