| 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 extensions. | 5 // IPC messages for extensions. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // URL of the frame the request was sent from. This isn't necessarily an | 33 // URL of the frame the request was sent from. This isn't necessarily an |
| 34 // extension url. Extension requests can also originate from content scripts, | 34 // extension url. Extension requests can also originate from content scripts, |
| 35 // in which case extension_id will indicate the ID of the associated | 35 // in which case extension_id will indicate the ID of the associated |
| 36 // extension. Or, they can originate from hosted apps or normal web pages. | 36 // extension. Or, they can originate from hosted apps or normal web pages. |
| 37 IPC_STRUCT_MEMBER(GURL, source_url) | 37 IPC_STRUCT_MEMBER(GURL, source_url) |
| 38 | 38 |
| 39 // Web security origin of the frame the request was sent from. | 39 // Web security origin of the frame the request was sent from. |
| 40 IPC_STRUCT_MEMBER(string16, source_origin) | 40 IPC_STRUCT_MEMBER(string16, source_origin) |
| 41 | 41 |
| 42 // The Feature::Context type this request came from. |
| 43 IPC_STRUCT_MEMBER(int, source_context_type) |
| 44 |
| 42 // Unique request id to match requests and responses. | 45 // Unique request id to match requests and responses. |
| 43 IPC_STRUCT_MEMBER(int, request_id) | 46 IPC_STRUCT_MEMBER(int, request_id) |
| 44 | 47 |
| 45 // True if request has a callback specified. | 48 // True if request has a callback specified. |
| 46 IPC_STRUCT_MEMBER(bool, has_callback) | 49 IPC_STRUCT_MEMBER(bool, has_callback) |
| 47 | 50 |
| 48 // True if request is executed in response to an explicit user gesture. | 51 // True if request is executed in response to an explicit user gesture. |
| 49 IPC_STRUCT_MEMBER(bool, user_gesture) | 52 IPC_STRUCT_MEMBER(bool, user_gesture) |
| 50 IPC_STRUCT_END() | 53 IPC_STRUCT_END() |
| 51 | 54 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, | 296 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, |
| 294 ExtensionHostMsg_Request_Params) | 297 ExtensionHostMsg_Request_Params) |
| 295 | 298 |
| 296 // A renderer sends this message when an extension process starts an API | 299 // A renderer sends this message when an extension process starts an API |
| 297 // request. The browser will always respond with a ExtensionMsg_Response. | 300 // request. The browser will always respond with a ExtensionMsg_Response. |
| 298 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, | 301 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, |
| 299 int /* routing_id */, | 302 int /* routing_id */, |
| 300 ExtensionHostMsg_Request_Params) | 303 ExtensionHostMsg_Request_Params) |
| 301 | 304 |
| 302 // Notify the browser that the given extension added a listener to an event. | 305 // Notify the browser that the given extension added a listener to an event. |
| 303 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddListener, | 306 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_AddListener, |
| 304 std::string /* extension_id */, | 307 std::string /* extension_id */, |
| 305 std::string /* name */) | 308 std::string /* name */, |
| 309 int /* source_context_type */) |
| 306 | 310 |
| 307 // Notify the browser that the given extension removed a listener from an | 311 // Notify the browser that the given extension removed a listener from an |
| 308 // event. | 312 // event. |
| 309 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveListener, | 313 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveListener, |
| 310 std::string /* extension_id */, | 314 std::string /* extension_id */, |
| 311 std::string /* name */) | 315 std::string /* name */) |
| 312 | 316 |
| 313 // Notify the browser that the given extension added a listener to an event from | 317 // Notify the browser that the given extension added a listener to an event from |
| 314 // a lazy background page. | 318 // a lazy background page. |
| 315 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddLazyListener, | 319 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_AddLazyListener, |
| 316 std::string /* extension_id */, | 320 std::string /* extension_id */, |
| 317 std::string /* name */) | 321 std::string /* name */, |
| 322 int /* source_context_type */) |
| 318 | 323 |
| 319 // Notify the browser that the given extension is no longer interested in | 324 // Notify the browser that the given extension is no longer interested in |
| 320 // receiving the given event from a lazy background page. | 325 // receiving the given event from a lazy background page. |
| 321 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveLazyListener, | 326 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveLazyListener, |
| 322 std::string /* extension_id */, | 327 std::string /* extension_id */, |
| 323 std::string /* name */) | 328 std::string /* name */) |
| 324 | 329 |
| 325 // Notify the browser that an event has finished being dispatched. | 330 // Notify the browser that an event has finished being dispatched. |
| 326 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ExtensionEventAck, | 331 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ExtensionEventAck, |
| 327 std::string /* extension_id */) | 332 std::string /* extension_id */) |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 | 419 |
| 415 // Informs the browser there is one less thing keeping the lazy background page | 420 // Informs the browser there is one less thing keeping the lazy background page |
| 416 // alive. | 421 // alive. |
| 417 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_DecrementLazyKeepaliveCount, | 422 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_DecrementLazyKeepaliveCount, |
| 418 std::string /* extension_id */) | 423 std::string /* extension_id */) |
| 419 | 424 |
| 420 // Fetches a globally unique ID (for the lifetime of the browser) from the | 425 // Fetches a globally unique ID (for the lifetime of the browser) from the |
| 421 // browser process. | 426 // browser process. |
| 422 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, | 427 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, |
| 423 int /* unique_id */) | 428 int /* unique_id */) |
| OLD | NEW |