| 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 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2356 bool /* is_begin */) | 2356 bool /* is_begin */) |
| 2357 | 2357 |
| 2358 #elif defined(OS_MACOSX) | 2358 #elif defined(OS_MACOSX) |
| 2359 // Request that the browser load a font into shared memory for us. | 2359 // Request that the browser load a font into shared memory for us. |
| 2360 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont, | 2360 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont, |
| 2361 FontDescriptor /* font to load */, | 2361 FontDescriptor /* font to load */, |
| 2362 uint32 /* buffer size */, | 2362 uint32 /* buffer size */, |
| 2363 base::SharedMemoryHandle /* font data */, | 2363 base::SharedMemoryHandle /* font data */, |
| 2364 uint32 /* font id */) | 2364 uint32 /* font id */) |
| 2365 | 2365 |
| 2366 // On OSX, we cannot allocated shared memory from within the sandbox, so | 2366 // Informs the browser that a plugin has gained or lost focus. |
| 2367 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged, |
| 2368 bool, /* focused */ |
| 2369 int /* plugin_id */) |
| 2370 |
| 2371 // Instructs the browser to start plugin IME. |
| 2372 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) |
| 2373 |
| 2374 #elif defined(OS_WIN) |
| 2375 // Request that the given font characters be loaded by the browser so it's |
| 2376 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters |
| 2377 // for details. |
| 2378 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, |
| 2379 LOGFONT /* font_data */, |
| 2380 string16 /* characters */) |
| 2381 #endif |
| 2382 |
| 2383 #if defined(OS_POSIX) |
| 2384 // On POSIX, we cannot allocated shared memory from within the sandbox, so |
| 2367 // this call exists for the renderer to ask the browser to allocate memory | 2385 // this call exists for the renderer to ask the browser to allocate memory |
| 2368 // on its behalf. We return a file descriptor to the POSIX shared memory. | 2386 // on its behalf. We return a file descriptor to the POSIX shared memory. |
| 2369 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept | 2387 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept |
| 2370 // by the browser, and it is the caller's repsonsibility to send a | 2388 // by the browser, and it is the caller's repsonsibility to send a |
| 2371 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem. | 2389 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem. |
| 2372 // In all cases, the caller is responsible for deleting the resulting | 2390 // In all cases, the caller is responsible for deleting the resulting |
| 2373 // TransportDIB. | 2391 // TransportDIB. |
| 2374 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB, | 2392 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB, |
| 2375 size_t, /* bytes requested */ | 2393 size_t, /* bytes requested */ |
| 2376 bool, /* cache in the browser */ | 2394 bool, /* cache in the browser */ |
| 2377 TransportDIB::Handle /* DIB */) | 2395 TransportDIB::Handle /* DIB */) |
| 2378 | 2396 |
| 2379 // Since the browser keeps handles to the allocated transport DIBs, this | 2397 // Since the browser keeps handles to the allocated transport DIBs, this |
| 2380 // message is sent to tell the browser that it may release them when the | 2398 // message is sent to tell the browser that it may release them when the |
| 2381 // renderer is finished with them. | 2399 // renderer is finished with them. |
| 2382 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, | 2400 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, |
| 2383 TransportDIB::Id /* DIB id */) | 2401 TransportDIB::Id /* DIB id */) |
| 2384 | |
| 2385 // Informs the browser that a plugin has gained or lost focus. | |
| 2386 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged, | |
| 2387 bool, /* focused */ | |
| 2388 int /* plugin_id */) | |
| 2389 | |
| 2390 // Instructs the browser to start plugin IME. | |
| 2391 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) | |
| 2392 | |
| 2393 #elif defined(OS_WIN) | |
| 2394 // Request that the given font characters be loaded by the browser so it's | |
| 2395 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters | |
| 2396 // for details. | |
| 2397 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, | |
| 2398 LOGFONT /* font_data */, | |
| 2399 string16 /* characters */) | |
| 2400 #endif | 2402 #endif |
| 2401 | 2403 |
| 2402 // Adding a new message? Stick to the sort order above: first platform | 2404 // Adding a new message? Stick to the sort order above: first platform |
| 2403 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 2405 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
| 2404 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 2406 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
| OLD | NEW |