| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_GPU_GPU_CHANNEL_H_ | 5 #ifndef CHROME_GPU_GPU_CHANNEL_H_ |
| 6 #define CHROME_GPU_GPU_CHANNEL_H_ | 6 #define CHROME_GPU_GPU_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| 11 #include "base/mp/message_router.h" |
| 11 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
| 12 #include "base/scoped_open_process.h" | 13 #include "base/scoped_open_process.h" |
| 13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 14 #include "chrome/common/message_router.h" | |
| 15 #include "chrome/gpu/gpu_command_buffer_stub.h" | 15 #include "chrome/gpu/gpu_command_buffer_stub.h" |
| 16 #include "gfx/native_widget_types.h" | 16 #include "gfx/native_widget_types.h" |
| 17 #include "gfx/size.h" | 17 #include "gfx/size.h" |
| 18 #include "ipc/ipc_channel.h" | 18 #include "ipc/ipc_channel.h" |
| 19 #include "ipc/ipc_message.h" | 19 #include "ipc/ipc_message.h" |
| 20 #include "ipc/ipc_sync_channel.h" | 20 #include "ipc/ipc_sync_channel.h" |
| 21 | 21 |
| 22 // Encapsulates an IPC channel between the GPU process and one renderer | 22 // Encapsulates an IPC channel between the GPU process and one renderer |
| 23 // process. On the renderer side there's a corresponding GpuChannelHost. | 23 // process. On the renderer side there's a corresponding GpuChannelHost. |
| 24 class GpuChannel : public IPC::Channel::Listener, | 24 class GpuChannel : public IPC::Channel::Listener, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // The id of the renderer who is on the other side of the channel. | 78 // The id of the renderer who is on the other side of the channel. |
| 79 int renderer_id_; | 79 int renderer_id_; |
| 80 | 80 |
| 81 #if defined(OS_POSIX) | 81 #if defined(OS_POSIX) |
| 82 // FD for the renderer end of the pipe. It is stored until we send it over | 82 // FD for the renderer end of the pipe. It is stored until we send it over |
| 83 // IPC after which it is cleared. It will be closed by the IPC mechanism. | 83 // IPC after which it is cleared. It will be closed by the IPC mechanism. |
| 84 int renderer_fd_; | 84 int renderer_fd_; |
| 85 #endif | 85 #endif |
| 86 | 86 |
| 87 // Used to implement message routing functionality to CommandBuffer objects | 87 // Used to implement message routing functionality to CommandBuffer objects |
| 88 MessageRouter router_; | 88 base::MessageRouter router_; |
| 89 | 89 |
| 90 #if defined(ENABLE_GPU) | 90 #if defined(ENABLE_GPU) |
| 91 typedef base::hash_map<int32, scoped_refptr<GpuCommandBufferStub> > StubMap; | 91 typedef base::hash_map<int32, scoped_refptr<GpuCommandBufferStub> > StubMap; |
| 92 StubMap stubs_; | 92 StubMap stubs_; |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 bool log_messages_; // True if we should log sent and received messages. | 95 bool log_messages_; // True if we should log sent and received messages. |
| 96 | 96 |
| 97 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 97 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 #endif // CHROME_GPU_GPU_CHANNEL_H_ | 100 #endif // CHROME_GPU_GPU_CHANNEL_H_ |
| OLD | NEW |