| 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 // Multiply-included message header, no traditional include guard. | 5 // Multiply-included message header, no traditional include guard. |
| 6 #include <map> | 6 #include <map> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "ppapi/proxy/ppapi_proxy_export.h" | 55 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 56 #include "ppapi/proxy/resource_message_params.h" | 56 #include "ppapi/proxy/resource_message_params.h" |
| 57 #include "ppapi/proxy/serialized_flash_menu.h" | 57 #include "ppapi/proxy/serialized_flash_menu.h" |
| 58 #include "ppapi/proxy/serialized_handle.h" | 58 #include "ppapi/proxy/serialized_handle.h" |
| 59 #include "ppapi/proxy/serialized_structs.h" | 59 #include "ppapi/proxy/serialized_structs.h" |
| 60 #include "ppapi/proxy/serialized_var.h" | 60 #include "ppapi/proxy/serialized_var.h" |
| 61 #include "ppapi/shared_impl/dir_contents.h" | 61 #include "ppapi/shared_impl/dir_contents.h" |
| 62 #include "ppapi/shared_impl/file_growth.h" | 62 #include "ppapi/shared_impl/file_growth.h" |
| 63 #include "ppapi/shared_impl/file_path.h" | 63 #include "ppapi/shared_impl/file_path.h" |
| 64 #include "ppapi/shared_impl/file_ref_create_info.h" | 64 #include "ppapi/shared_impl/file_ref_create_info.h" |
| 65 #include "ppapi/shared_impl/ppapi_nacl_channel_args.h" | 65 #include "ppapi/shared_impl/ppapi_initialize_nacl_dispatcher_args.h" |
| 66 #include "ppapi/shared_impl/ppapi_preferences.h" | 66 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 67 #include "ppapi/shared_impl/ppb_device_ref_shared.h" | 67 #include "ppapi/shared_impl/ppb_device_ref_shared.h" |
| 68 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 68 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 69 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h" | 69 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h" |
| 70 #include "ppapi/shared_impl/ppb_view_shared.h" | 70 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 71 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" | 71 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" |
| 72 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" | 72 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" |
| 73 #include "ppapi/shared_impl/socket_option_data.h" | 73 #include "ppapi/shared_impl/socket_option_data.h" |
| 74 #include "ppapi/shared_impl/url_request_info_data.h" | 74 #include "ppapi/shared_impl/url_request_info_data.h" |
| 75 #include "ppapi/shared_impl/url_response_info_data.h" | 75 #include "ppapi/shared_impl/url_response_info_data.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::SerializedNetworkInfo) | 342 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::SerializedNetworkInfo) |
| 343 IPC_STRUCT_TRAITS_MEMBER(name) | 343 IPC_STRUCT_TRAITS_MEMBER(name) |
| 344 IPC_STRUCT_TRAITS_MEMBER(type) | 344 IPC_STRUCT_TRAITS_MEMBER(type) |
| 345 IPC_STRUCT_TRAITS_MEMBER(state) | 345 IPC_STRUCT_TRAITS_MEMBER(state) |
| 346 IPC_STRUCT_TRAITS_MEMBER(addresses) | 346 IPC_STRUCT_TRAITS_MEMBER(addresses) |
| 347 IPC_STRUCT_TRAITS_MEMBER(display_name) | 347 IPC_STRUCT_TRAITS_MEMBER(display_name) |
| 348 IPC_STRUCT_TRAITS_MEMBER(mtu) | 348 IPC_STRUCT_TRAITS_MEMBER(mtu) |
| 349 IPC_STRUCT_TRAITS_END() | 349 IPC_STRUCT_TRAITS_END() |
| 350 | 350 |
| 351 // Only whitelisted switches passed through NaClChannelArgs. | 351 // Only whitelisted switches passed through InitializeNaClDispatcherArgs. |
| 352 // The list of switches can be found in: | 352 // The list of switches can be found in: |
| 353 // chrome/browser/nacl_host/nacl_process_host.cc | 353 // components/nacl/browser/nacl_process_host.cc |
| 354 IPC_STRUCT_TRAITS_BEGIN(ppapi::PpapiNaClChannelArgs) | 354 IPC_STRUCT_TRAITS_BEGIN(ppapi::PpapiInitializeNaClDispatcherArgs) |
| 355 IPC_STRUCT_TRAITS_MEMBER(off_the_record) | 355 IPC_STRUCT_TRAITS_MEMBER(off_the_record) |
| 356 IPC_STRUCT_TRAITS_MEMBER(permissions) | 356 IPC_STRUCT_TRAITS_MEMBER(permissions) |
| 357 IPC_STRUCT_TRAITS_MEMBER(switch_names) | 357 IPC_STRUCT_TRAITS_MEMBER(switch_names) |
| 358 IPC_STRUCT_TRAITS_MEMBER(switch_values) | 358 IPC_STRUCT_TRAITS_MEMBER(switch_values) |
| 359 IPC_STRUCT_TRAITS_END() | 359 IPC_STRUCT_TRAITS_END() |
| 360 | 360 |
| 361 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 361 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
| 362 | 362 |
| 363 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::PPPDecryptor_Buffer) | 363 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::PPPDecryptor_Buffer) |
| 364 IPC_STRUCT_TRAITS_MEMBER(resource) | 364 IPC_STRUCT_TRAITS_MEMBER(resource) |
| 365 IPC_STRUCT_TRAITS_MEMBER(handle) | 365 IPC_STRUCT_TRAITS_MEMBER(handle) |
| 366 IPC_STRUCT_TRAITS_MEMBER(size) | 366 IPC_STRUCT_TRAITS_MEMBER(size) |
| 367 IPC_STRUCT_TRAITS_END() | 367 IPC_STRUCT_TRAITS_END() |
| 368 | 368 |
| 369 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) | 369 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) |
| 370 | 370 |
| 371 // These are from the browser to the plugin. | 371 // These are from the browser to the plugin. |
| 372 // Loads the given plugin. | 372 // Loads the given plugin. |
| 373 IPC_MESSAGE_CONTROL2(PpapiMsg_LoadPlugin, | 373 IPC_MESSAGE_CONTROL2(PpapiMsg_LoadPlugin, |
| 374 base::FilePath /* path */, | 374 base::FilePath /* path */, |
| 375 ppapi::PpapiPermissions /* permissions */) | 375 ppapi::PpapiPermissions /* permissions */) |
| 376 | 376 |
| 377 // Creates a channel to talk to a renderer. The plugin will respond with | 377 // Creates a channel to talk to a renderer. The plugin will respond with |
| 378 // PpapiHostMsg_ChannelCreated. | 378 // PpapiHostMsg_ChannelCreated. |
| 379 IPC_MESSAGE_CONTROL3(PpapiMsg_CreateChannel, | 379 IPC_MESSAGE_CONTROL3(PpapiMsg_CreateChannel, |
| 380 base::ProcessId /* renderer_pid */, | 380 base::ProcessId /* renderer_pid */, |
| 381 int /* renderer_child_id */, | 381 int /* renderer_child_id */, |
| 382 bool /* incognito */) | 382 bool /* incognito */) |
| 383 | 383 |
| 384 // Creates a channel to talk to a renderer. This message is only used by the | 384 // Initializes the IPC dispatchers in the NaCl plugin. |
| 385 // NaCl IPC proxy. It is intercepted by NaClIPCAdapter, which creates the | 385 IPC_MESSAGE_CONTROL1(PpapiMsg_InitializeNaClDispatcher, |
| 386 // actual channel and rewrites the message for the untrusted side. | 386 ppapi::PpapiInitializeNaClDispatcherArgs /* args */) |
| 387 IPC_MESSAGE_CONTROL2(PpapiMsg_CreateNaClChannel, | |
| 388 ppapi::PpapiNaClChannelArgs /* args */, | |
| 389 ppapi::proxy::SerializedHandle /* channel_handle */) | |
| 390 | 387 |
| 391 // Instructs the plugin process to crash. | 388 // Instructs the plugin process to crash. |
| 392 IPC_MESSAGE_CONTROL0(PpapiMsg_Crash) | 389 IPC_MESSAGE_CONTROL0(PpapiMsg_Crash) |
| 393 | 390 |
| 394 // Instructs the plugin process to hang. | 391 // Instructs the plugin process to hang. |
| 395 IPC_MESSAGE_CONTROL0(PpapiMsg_Hang) | 392 IPC_MESSAGE_CONTROL0(PpapiMsg_Hang) |
| 396 | 393 |
| 397 // Each plugin may be referenced by multiple renderers. We need the instance | 394 // Each plugin may be referenced by multiple renderers. We need the instance |
| 398 // IDs to be unique within a plugin, despite coming from different renderers, | 395 // IDs to be unique within a plugin, despite coming from different renderers, |
| 399 // and unique within a renderer, despite going to different plugins. This means | 396 // and unique within a renderer, despite going to different plugins. This means |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 | 732 |
| 736 // ----------------------------------------------------------------------------- | 733 // ----------------------------------------------------------------------------- |
| 737 // These are from the plugin to the renderer. | 734 // These are from the plugin to the renderer. |
| 738 | 735 |
| 739 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel | 736 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel |
| 740 // could not be established. This could be because the IPC could not be created | 737 // could not be established. This could be because the IPC could not be created |
| 741 // for some weird reason, but more likely that the plugin failed to load or | 738 // for some weird reason, but more likely that the plugin failed to load or |
| 742 // initialize properly. | 739 // initialize properly. |
| 743 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated, | 740 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated, |
| 744 IPC::ChannelHandle /* handle */) | 741 IPC::ChannelHandle /* handle */) |
| 745 IPC_MESSAGE_CONTROL1(PpapiHostMsg_NaClChannelCreated, | |
| 746 IPC::ChannelHandle /* handle */) | |
| 747 | 742 |
| 748 // Logs the given message to the console of all instances. | 743 // Logs the given message to the console of all instances. |
| 749 IPC_MESSAGE_CONTROL4(PpapiHostMsg_LogWithSource, | 744 IPC_MESSAGE_CONTROL4(PpapiHostMsg_LogWithSource, |
| 750 PP_Instance /* instance */, | 745 PP_Instance /* instance */, |
| 751 int /* log_level */, | 746 int /* log_level */, |
| 752 std::string /* source */, | 747 std::string /* source */, |
| 753 std::string /* value */) | 748 std::string /* value */) |
| 754 | 749 |
| 755 // PPB_Audio. | 750 // PPB_Audio. |
| 756 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create, | 751 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create, |
| (...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Talk_RequestPermission, | 2053 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Talk_RequestPermission, |
| 2059 PP_TalkPermission /* permission */) | 2054 PP_TalkPermission /* permission */) |
| 2060 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_RequestPermissionReply) | 2055 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_RequestPermissionReply) |
| 2061 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StartRemoting) | 2056 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StartRemoting) |
| 2062 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StartRemotingReply) | 2057 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StartRemotingReply) |
| 2063 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StopRemoting) | 2058 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StopRemoting) |
| 2064 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StopRemotingReply) | 2059 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StopRemotingReply) |
| 2065 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Talk_NotifyEvent, PP_TalkEvent /* event */) | 2060 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Talk_NotifyEvent, PP_TalkEvent /* event */) |
| 2066 | 2061 |
| 2067 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) | 2062 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) |
| OLD | NEW |