| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // IPC messages for page rendering. | 5 // IPC messages for page rendering. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/process.h" | 8 #include "base/process.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2296 #if defined(OS_POSIX) | 2296 #if defined(OS_POSIX) |
| 2297 // On POSIX, we cannot allocated shared memory from within the sandbox, so | 2297 // On POSIX, we cannot allocated shared memory from within the sandbox, so |
| 2298 // this call exists for the renderer to ask the browser to allocate memory | 2298 // this call exists for the renderer to ask the browser to allocate memory |
| 2299 // on its behalf. We return a file descriptor to the POSIX shared memory. | 2299 // on its behalf. We return a file descriptor to the POSIX shared memory. |
| 2300 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept | 2300 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept |
| 2301 // by the browser, and it is the caller's repsonsibility to send a | 2301 // by the browser, and it is the caller's repsonsibility to send a |
| 2302 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem. | 2302 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem. |
| 2303 // In all cases, the caller is responsible for deleting the resulting | 2303 // In all cases, the caller is responsible for deleting the resulting |
| 2304 // TransportDIB. | 2304 // TransportDIB. |
| 2305 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB, | 2305 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB, |
| 2306 size_t, /* bytes requested */ | 2306 uint32_t, /* bytes requested */ |
| 2307 bool, /* cache in the browser */ | 2307 bool, /* cache in the browser */ |
| 2308 TransportDIB::Handle /* DIB */) | 2308 TransportDIB::Handle /* DIB */) |
| 2309 | 2309 |
| 2310 // Since the browser keeps handles to the allocated transport DIBs, this | 2310 // Since the browser keeps handles to the allocated transport DIBs, this |
| 2311 // message is sent to tell the browser that it may release them when the | 2311 // message is sent to tell the browser that it may release them when the |
| 2312 // renderer is finished with them. | 2312 // renderer is finished with them. |
| 2313 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, | 2313 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, |
| 2314 TransportDIB::Id /* DIB id */) | 2314 TransportDIB::Id /* DIB id */) |
| 2315 #endif | 2315 #endif |
| 2316 | 2316 |
| 2317 // Adding a new message? Stick to the sort order above: first platform | 2317 // Adding a new message? Stick to the sort order above: first platform |
| 2318 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 2318 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
| 2319 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 2319 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
| OLD | NEW |