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 #include <vector> | 5 #include <vector> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "chrome/common/gpu_video_common.h" | 9 #include "chrome/common/gpu_video_common.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 | 11 |
12 #define IPC_MESSAGE_START GpuMsgStart | 12 #define IPC_MESSAGE_START GpuMsgStart |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Size; | 15 class Size; |
16 } | 16 } |
17 | 17 |
18 namespace IPC { | 18 namespace IPC { |
19 struct ChannelHandle; | 19 struct ChannelHandle; |
20 } | 20 } |
21 | 21 |
22 struct GPUCreateCommandBufferConfig; | 22 struct GPUCreateCommandBufferConfig; |
23 class GPUInfo; | 23 class GPUInfo; |
24 | 24 |
25 //------------------------------------------------------------------------------ | 25 //------------------------------------------------------------------------------ |
26 // GPU Messages | 26 // GPU Messages |
27 // These are messages from the browser to the GPU process. | 27 // These are messages from the browser to the GPU process. |
| 28 |
| 29 // Tells the GPU process to initialize itself. The browser explicitly |
| 30 // requests this be done so that we are guaranteed that the channel is set |
| 31 // up between the browser and GPU process before doing any work that might |
| 32 // potentially crash the GPU process. Detection of the child process |
| 33 // exiting abruptly is predicated on having the IPC channel set up. |
| 34 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) |
| 35 |
28 // Tells the GPU process to create a new channel for communication with a | 36 // Tells the GPU process to create a new channel for communication with a |
29 // given renderer. The channel name is returned in a | 37 // given renderer. The channel name is returned in a |
30 // GpuHostMsg_ChannelEstablished message. The renderer ID is passed so that | 38 // GpuHostMsg_ChannelEstablished message. The renderer ID is passed so that |
31 // the GPU process reuses an existing channel to that process if it exists. | 39 // the GPU process reuses an existing channel to that process if it exists. |
32 // This ID is a unique opaque identifier generated by the browser process. | 40 // This ID is a unique opaque identifier generated by the browser process. |
33 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel, | 41 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel, |
34 int /* renderer_id */) | 42 int /* renderer_id */) |
35 | 43 |
36 // Tells the GPU process to close the channel identified by IPC channel | 44 // Tells the GPU process to close the channel identified by IPC channel |
37 // handle. If no channel can be identified, do nothing. | 45 // handle. If no channel can be identified, do nothing. |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // Release all video frames allocated for a hardware video decoder. | 336 // Release all video frames allocated for a hardware video decoder. |
329 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_ReleaseAllVideoFrames) | 337 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_ReleaseAllVideoFrames) |
330 | 338 |
331 // GpuVideoDecoder report output format change. | 339 // GpuVideoDecoder report output format change. |
332 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_MediaFormatChange, | 340 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_MediaFormatChange, |
333 GpuVideoDecoderFormatChangeParam) | 341 GpuVideoDecoderFormatChangeParam) |
334 | 342 |
335 // GpuVideoDecoder report error. | 343 // GpuVideoDecoder report error. |
336 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_ErrorNotification, | 344 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_ErrorNotification, |
337 GpuVideoDecoderErrorInfoParam) | 345 GpuVideoDecoderErrorInfoParam) |
OLD | NEW |