OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // extension ids | 352 // extension ids |
353 extensions::ExtensionsClient::ScriptingWhitelist) | 353 extensions::ExtensionsClient::ScriptingWhitelist) |
354 | 354 |
355 // Notification that renderer should run some JavaScript code. | 355 // Notification that renderer should run some JavaScript code. |
356 IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode, | 356 IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode, |
357 ExtensionMsg_ExecuteCode_Params) | 357 ExtensionMsg_ExecuteCode_Params) |
358 | 358 |
359 // Notification that the user scripts have been updated. It has one | 359 // Notification that the user scripts have been updated. It has one |
360 // SharedMemoryHandle argument consisting of the pickled script data. This | 360 // SharedMemoryHandle argument consisting of the pickled script data. This |
361 // handle is valid in the context of the renderer. | 361 // handle is valid in the context of the renderer. |
362 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateUserScripts, | 362 // If |changed_extensions| is not empty, only the extensions in that set will |
363 base::SharedMemoryHandle) | 363 // be updated. Otherwise, all extensions will be updated. |
| 364 IPC_MESSAGE_CONTROL2(ExtensionMsg_UpdateUserScripts, |
| 365 base::SharedMemoryHandle, |
| 366 std::set<std::string> /* changed extensions */) |
364 | 367 |
365 // Tell the render view which browser window it's being attached to. | 368 // Tell the render view which browser window it's being attached to. |
366 IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId, | 369 IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId, |
367 int /* id of browser window */) | 370 int /* id of browser window */) |
368 | 371 |
369 // Tell the render view what its tab ID is. | 372 // Tell the render view what its tab ID is. |
370 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, | 373 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, |
371 int /* id of tab */) | 374 int /* id of tab */) |
372 | 375 |
373 // Tell the renderer to update an extension's permission set. | 376 // Tell the renderer to update an extension's permission set. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 // Sent from the renderer to the browser to notify that content scripts are | 576 // Sent from the renderer to the browser to notify that content scripts are |
574 // running in the renderer that the IPC originated from. | 577 // running in the renderer that the IPC originated from. |
575 // Note that the page_id is for the parent (or more accurately the topmost) | 578 // Note that the page_id is for the parent (or more accurately the topmost) |
576 // frame (e.g. if executing in an iframe this is the page ID of the parent, | 579 // frame (e.g. if executing in an iframe this is the page ID of the parent, |
577 // unless the parent is an iframe... etc). | 580 // unless the parent is an iframe... etc). |
578 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting, | 581 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting, |
579 ExecutingScriptsMap, | 582 ExecutingScriptsMap, |
580 int32 /* page_id of the _topmost_ frame */, | 583 int32 /* page_id of the _topmost_ frame */, |
581 GURL /* url of the _topmost_ frame */) | 584 GURL /* url of the _topmost_ frame */) |
582 | 585 |
583 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_NotifyExtensionScriptExecution, | 586 // Sent from the renderer to the browser to request permission for a content |
| 587 // script to execute on a given page. |
| 588 // If request id is -1, this signals that the request has already ran, and this |
| 589 // merely serves as a notification. This happens when the feature to disable |
| 590 // scripts running without user consent is not enabled. |
| 591 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_RequestContentScriptPermission, |
584 std::string /* extension id */, | 592 std::string /* extension id */, |
585 int /* page id */) | 593 int /* page id */, |
| 594 int /* request id */) |
| 595 |
| 596 // Sent from the browser to the renderer in reply to a |
| 597 // RequestContentScriptPermission message, granting permission for a content |
| 598 // script to run. |
| 599 IPC_MESSAGE_ROUTED1(ExtensionMsg_GrantContentScriptPermission, |
| 600 int /* request id */) |
586 | 601 |
587 // Sent by the renderer when a web page is checking if its app is installed. | 602 // Sent by the renderer when a web page is checking if its app is installed. |
588 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_GetAppInstallState, | 603 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_GetAppInstallState, |
589 GURL /* requestor_url */, | 604 GURL /* requestor_url */, |
590 int32 /* return_route_id */, | 605 int32 /* return_route_id */, |
591 int32 /* callback_id */) | 606 int32 /* callback_id */) |
592 | 607 |
593 // Optional Ack message sent to the browser to notify that the response to a | 608 // Optional Ack message sent to the browser to notify that the response to a |
594 // function has been processed. | 609 // function has been processed. |
595 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck, | 610 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the | 662 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the |
648 // main frame. | 663 // main frame. |
649 // * Something changed on an existing frame causing the set of matching searches | 664 // * Something changed on an existing frame causing the set of matching searches |
650 // to change. | 665 // to change. |
651 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, | 666 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, |
652 std::vector<std::string> /* Matching CSS selectors */) | 667 std::vector<std::string> /* Matching CSS selectors */) |
653 | 668 |
654 // Sent by the renderer when it has received a Blob handle from the browser. | 669 // Sent by the renderer when it has received a Blob handle from the browser. |
655 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_TransferBlobsAck, | 670 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_TransferBlobsAck, |
656 std::vector<std::string> /* blob_uuids */) | 671 std::vector<std::string> /* blob_uuids */) |
OLD | NEW |