| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 file, hence no include guard. | 5 // Multiply-included message file, hence no include guard. |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/child/plugin_param_traits.h" | |
| 11 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 12 #include "content/common/content_param_traits.h" | 11 #include "content/common/content_param_traits.h" |
| 13 #include "content/common/cursors/webcursor.h" | 12 #include "content/common/cursors/webcursor.h" |
| 14 #include "ipc/ipc_channel_handle.h" | 13 #include "ipc/ipc_channel_handle.h" |
| 15 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
| 16 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 17 #include "ui/gfx/ipc/gfx_param_traits.h" | 16 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 19 #include "ui/surface/transport_dib.h" | 18 #include "ui/surface/transport_dib.h" |
| 20 #include "url/ipc/url_param_traits.h" | 19 #include "url/ipc/url_param_traits.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 bool /* result */) | 70 bool /* result */) |
| 72 | 71 |
| 73 // Used to synchronously request a paint for windowless plugins. | 72 // Used to synchronously request a paint for windowless plugins. |
| 74 IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, | 73 IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, |
| 75 gfx::Rect /* damaged_rect */) | 74 gfx::Rect /* damaged_rect */) |
| 76 | 75 |
| 77 // Sent by the renderer after it paints from its backing store so that the | 76 // Sent by the renderer after it paints from its backing store so that the |
| 78 // plugin knows it can send more invalidates. | 77 // plugin knows it can send more invalidates. |
| 79 IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) | 78 IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) |
| 80 | 79 |
| 81 IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_GetPluginScriptableObject, | |
| 82 int /* route_id */) | |
| 83 | |
| 84 // Gets the form value of the plugin instance synchronously. | 80 // Gets the form value of the plugin instance synchronously. |
| 85 IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetFormValue, | 81 IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetFormValue, |
| 86 base::string16 /* value */, | 82 base::string16 /* value */, |
| 87 bool /* success */) | 83 bool /* success */) |
| 88 | 84 |
| 89 // Updates the plugin location. | 85 // Updates the plugin location. |
| 90 IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry, | 86 IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry, |
| 91 PluginMsg_UpdateGeometry_Param) | 87 PluginMsg_UpdateGeometry_Param) |
| 92 | 88 |
| 93 // A synchronous version of above. | 89 // A synchronous version of above. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 #endif | 127 #endif |
| 132 | 128 |
| 133 //----------------------------------------------------------------------------- | 129 //----------------------------------------------------------------------------- |
| 134 // PluginHost messages | 130 // PluginHost messages |
| 135 // These are messages sent from the plugin process to the renderer process. | 131 // These are messages sent from the plugin process to the renderer process. |
| 136 // They all map to the corresponding WebPlugin methods. | 132 // They all map to the corresponding WebPlugin methods. |
| 137 | 133 |
| 138 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, | 134 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, |
| 139 gfx::Rect /* rect */) | 135 gfx::Rect /* rect */) |
| 140 | 136 |
| 141 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetWindowScriptNPObject, | |
| 142 int /* route id */, | |
| 143 bool /* success */) | |
| 144 | |
| 145 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetPluginElement, | |
| 146 int /* route id */, | |
| 147 bool /* success */) | |
| 148 | |
| 149 IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_ResolveProxy, | 137 IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_ResolveProxy, |
| 150 GURL /* url */, | 138 GURL /* url */, |
| 151 bool /* result */, | 139 bool /* result */, |
| 152 std::string /* proxy list */) | 140 std::string /* proxy list */) |
| 153 | 141 |
| 154 IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, | 142 IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, |
| 155 GURL /* url */, | 143 GURL /* url */, |
| 156 GURL /* first_party_for_cookies */, | 144 GURL /* first_party_for_cookies */, |
| 157 std::string /* cookie */) | 145 std::string /* cookie */) |
| 158 | 146 |
| 159 IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, | 147 IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, |
| 160 GURL /* url */, | 148 GURL /* url */, |
| 161 GURL /* first_party_for_cookies */, | 149 GURL /* first_party_for_cookies */, |
| 162 std::string /* cookies */) | 150 std::string /* cookies */) |
| 163 | 151 |
| 164 IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad) | 152 IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad) |
| 165 | 153 |
| 166 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStartLoading) | 154 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStartLoading) |
| 167 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStopLoading) | 155 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStopLoading) |
| 168 | 156 |
| 169 IPC_SYNC_MESSAGE_CONTROL1_0(PluginHostMsg_SetException, | |
| 170 std::string /* message */) | |
| 171 | |
| 172 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) | 157 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) |
| 173 | 158 |
| 174 #if defined(OS_MACOSX) | 159 #if defined(OS_MACOSX) |
| 175 IPC_MESSAGE_ROUTED1(PluginHostMsg_FocusChanged, | 160 IPC_MESSAGE_ROUTED1(PluginHostMsg_FocusChanged, |
| 176 bool /* focused */) | 161 bool /* focused */) |
| 177 | 162 |
| 178 IPC_MESSAGE_ROUTED0(PluginHostMsg_StartIme) | 163 IPC_MESSAGE_ROUTED0(PluginHostMsg_StartIme) |
| 179 | 164 |
| 180 //---------------------------------------------------------------------- | 165 //---------------------------------------------------------------------- |
| 181 // Core Animation plugin implementation rendering via compositor. | 166 // Core Animation plugin implementation rendering via compositor. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 193 IPC_MESSAGE_ROUTED3(PluginHostMsg_AcceleratedPluginAllocatedIOSurface, | 178 IPC_MESSAGE_ROUTED3(PluginHostMsg_AcceleratedPluginAllocatedIOSurface, |
| 194 int32_t /* width */, | 179 int32_t /* width */, |
| 195 int32_t /* height */, | 180 int32_t /* height */, |
| 196 uint32_t /* surface_id */) | 181 uint32_t /* surface_id */) |
| 197 | 182 |
| 198 // Notifies the renderer process that the plugin produced a new frame | 183 // Notifies the renderer process that the plugin produced a new frame |
| 199 // of content into its IOSurface, and therefore that the compositor | 184 // of content into its IOSurface, and therefore that the compositor |
| 200 // needs to redraw. | 185 // needs to redraw. |
| 201 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) | 186 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) |
| 202 #endif | 187 #endif |
| 203 | |
| 204 | |
| 205 //----------------------------------------------------------------------------- | |
| 206 // NPObject messages | |
| 207 // These are messages used to marshall NPObjects. They are sent both from the | |
| 208 // plugin to the renderer and from the renderer to the plugin. | |
| 209 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) | |
| 210 | |
| 211 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, | |
| 212 content::NPIdentifier_Param /* name */, | |
| 213 bool /* result */) | |
| 214 | |
| 215 IPC_SYNC_MESSAGE_ROUTED3_2(NPObjectMsg_Invoke, | |
| 216 bool /* is_default */, | |
| 217 content::NPIdentifier_Param /* method */, | |
| 218 std::vector<content::NPVariant_Param> /* args */, | |
| 219 content::NPVariant_Param /* result_param */, | |
| 220 bool /* result */) | |
| 221 | |
| 222 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasProperty, | |
| 223 content::NPIdentifier_Param /* name */, | |
| 224 bool /* result */) | |
| 225 | |
| 226 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_GetProperty, | |
| 227 content::NPIdentifier_Param /* name */, | |
| 228 content::NPVariant_Param /* property */, | |
| 229 bool /* result */) | |
| 230 | |
| 231 IPC_SYNC_MESSAGE_ROUTED2_1(NPObjectMsg_SetProperty, | |
| 232 content::NPIdentifier_Param /* name */, | |
| 233 content::NPVariant_Param /* property */, | |
| 234 bool /* result */) | |
| 235 | |
| 236 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_RemoveProperty, | |
| 237 content::NPIdentifier_Param /* name */, | |
| 238 bool /* result */) | |
| 239 | |
| 240 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Invalidate) | |
| 241 | |
| 242 IPC_SYNC_MESSAGE_ROUTED0_2(NPObjectMsg_Enumeration, | |
| 243 std::vector<content::NPIdentifier_Param> /* value */, | |
| 244 bool /* result */) | |
| 245 | |
| 246 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, | |
| 247 std::vector<content::NPVariant_Param> /* args */, | |
| 248 content::NPVariant_Param /* result_param */, | |
| 249 bool /* result */) | |
| 250 | |
| 251 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, | |
| 252 std::string /* script */, | |
| 253 bool /* popups_allowed */, | |
| 254 content::NPVariant_Param /* result_param */, | |
| 255 bool /* result */) | |
| OLD | NEW |