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 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2254 bool /* enabled */) | 2254 bool /* enabled */) |
2255 | 2255 |
2256 #elif defined(OS_MACOSX) | 2256 #elif defined(OS_MACOSX) |
2257 // Request that the browser load a font into shared memory for us. | 2257 // Request that the browser load a font into shared memory for us. |
2258 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont, | 2258 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont, |
2259 FontDescriptor /* font to load */, | 2259 FontDescriptor /* font to load */, |
2260 uint32 /* buffer size */, | 2260 uint32 /* buffer size */, |
2261 base::SharedMemoryHandle /* font data */, | 2261 base::SharedMemoryHandle /* font data */, |
2262 uint32 /* font id */) | 2262 uint32 /* font id */) |
2263 | 2263 |
2264 // On OSX, we cannot allocated shared memory from within the sandbox, so | 2264 // Informs the browser that a plugin has gained or lost focus. |
| 2265 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged, |
| 2266 bool, /* focused */ |
| 2267 int /* plugin_id */) |
| 2268 |
| 2269 // Instructs the browser to start plugin IME. |
| 2270 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) |
| 2271 |
| 2272 #elif defined(OS_WIN) |
| 2273 // Request that the given font characters be loaded by the browser so it's |
| 2274 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters |
| 2275 // for details. |
| 2276 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, |
| 2277 LOGFONT /* font_data */, |
| 2278 string16 /* characters */) |
| 2279 #endif |
| 2280 |
| 2281 #if defined(OS_POSIX) |
| 2282 // On POSIX, we cannot allocated shared memory from within the sandbox, so |
2265 // this call exists for the renderer to ask the browser to allocate memory | 2283 // this call exists for the renderer to ask the browser to allocate memory |
2266 // on its behalf. We return a file descriptor to the POSIX shared memory. | 2284 // on its behalf. We return a file descriptor to the POSIX shared memory. |
2267 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept | 2285 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept |
2268 // by the browser, and it is the caller's repsonsibility to send a | 2286 // by the browser, and it is the caller's repsonsibility to send a |
2269 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem. | 2287 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem. |
2270 // In all cases, the caller is responsible for deleting the resulting | 2288 // In all cases, the caller is responsible for deleting the resulting |
2271 // TransportDIB. | 2289 // TransportDIB. |
2272 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB, | 2290 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB, |
2273 size_t, /* bytes requested */ | 2291 size_t, /* bytes requested */ |
2274 bool, /* cache in the browser */ | 2292 bool, /* cache in the browser */ |
2275 TransportDIB::Handle /* DIB */) | 2293 TransportDIB::Handle /* DIB */) |
2276 | 2294 |
2277 // Since the browser keeps handles to the allocated transport DIBs, this | 2295 // Since the browser keeps handles to the allocated transport DIBs, this |
2278 // message is sent to tell the browser that it may release them when the | 2296 // message is sent to tell the browser that it may release them when the |
2279 // renderer is finished with them. | 2297 // renderer is finished with them. |
2280 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, | 2298 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, |
2281 TransportDIB::Id /* DIB id */) | 2299 TransportDIB::Id /* DIB id */) |
2282 | |
2283 // Informs the browser that a plugin has gained or lost focus. | |
2284 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged, | |
2285 bool, /* focused */ | |
2286 int /* plugin_id */) | |
2287 | |
2288 // Instructs the browser to start plugin IME. | |
2289 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) | |
2290 | |
2291 #elif defined(OS_WIN) | |
2292 // Request that the given font characters be loaded by the browser so it's | |
2293 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters | |
2294 // for details. | |
2295 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, | |
2296 LOGFONT /* font_data */, | |
2297 string16 /* characters */) | |
2298 #endif | 2300 #endif |
2299 | 2301 |
2300 // Adding a new message? Stick to the sort order above: first platform | 2302 // Adding a new message? Stick to the sort order above: first platform |
2301 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 2303 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
2302 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 2304 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
OLD | NEW |