Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 extensions::Manifest::Location location; | 292 extensions::Manifest::Location location; |
| 293 | 293 |
| 294 // The path the extension was loaded from. This is used in the renderer only | 294 // The path the extension was loaded from. This is used in the renderer only |
| 295 // to generate the extension ID for extensions that are loaded unpacked. | 295 // to generate the extension ID for extensions that are loaded unpacked. |
| 296 base::FilePath path; | 296 base::FilePath path; |
| 297 | 297 |
| 298 // The extension's active and withheld permissions. | 298 // The extension's active and withheld permissions. |
| 299 ExtensionMsg_PermissionSetStruct active_permissions; | 299 ExtensionMsg_PermissionSetStruct active_permissions; |
| 300 ExtensionMsg_PermissionSetStruct withheld_permissions; | 300 ExtensionMsg_PermissionSetStruct withheld_permissions; |
| 301 std::map<int, ExtensionMsg_PermissionSetStruct> tab_specific_permissions; | 301 std::map<int, ExtensionMsg_PermissionSetStruct> tab_specific_permissions; |
| 302 extensions::URLPatternSet runtime_blocked_hosts; | |
| 303 extensions::URLPatternSet runtime_allowed_hosts; | |
|
asargent_no_longer_on_chrome
2016/11/23 01:19:23
Do we have any sort of limitation on the size of t
nrpeter
2017/01/02 19:57:45
Updated to use SharedMemoryHandle, this should let
| |
| 302 | 304 |
| 303 // We keep this separate so that it can be used in logging. | 305 // We keep this separate so that it can be used in logging. |
| 304 std::string id; | 306 std::string id; |
| 305 | 307 |
| 306 // Send creation flags so extension is initialized identically. | 308 // Send creation flags so extension is initialized identically. |
| 307 int creation_flags; | 309 int creation_flags; |
| 308 }; | 310 }; |
| 309 | 311 |
| 310 struct ExtensionHostMsg_AutomationQuerySelector_Error { | 312 struct ExtensionHostMsg_AutomationQuerySelector_Error { |
| 311 enum Value { kNone, kNoMainFrame, kNoDocument, kNodeDestroyed }; | 313 enum Value { kNone, kNoMainFrame, kNoDocument, kNodeDestroyed }; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 IPC_STRUCT_TRAITS_MEMBER(value) | 418 IPC_STRUCT_TRAITS_MEMBER(value) |
| 417 IPC_STRUCT_TRAITS_END() | 419 IPC_STRUCT_TRAITS_END() |
| 418 | 420 |
| 419 // Parameters structure for ExtensionMsg_UpdatePermissions. | 421 // Parameters structure for ExtensionMsg_UpdatePermissions. |
| 420 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params) | 422 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params) |
| 421 IPC_STRUCT_MEMBER(std::string, extension_id) | 423 IPC_STRUCT_MEMBER(std::string, extension_id) |
| 422 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, active_permissions) | 424 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, active_permissions) |
| 423 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, withheld_permissions) | 425 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, withheld_permissions) |
| 424 IPC_STRUCT_END() | 426 IPC_STRUCT_END() |
| 425 | 427 |
| 428 // Parameters structure for ExtensionMsg_UpdatePolicy. | |
| 429 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePolicy_Params) | |
| 430 IPC_STRUCT_MEMBER(std::string, extension_id) | |
| 431 IPC_STRUCT_MEMBER(extensions::URLPatternSet, runtime_blocked_hosts) | |
| 432 IPC_STRUCT_MEMBER(extensions::URLPatternSet, runtime_allowed_hosts) | |
| 433 IPC_STRUCT_END() | |
| 434 | |
| 426 // Messages sent from the browser to the renderer: | 435 // Messages sent from the browser to the renderer: |
| 427 | 436 |
| 428 // The browser sends this message in response to all extension api calls. The | 437 // The browser sends this message in response to all extension api calls. The |
| 429 // response data (if any) is one of the base::Value subclasses, wrapped as the | 438 // response data (if any) is one of the base::Value subclasses, wrapped as the |
| 430 // first element in a ListValue. | 439 // first element in a ListValue. |
| 431 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response, | 440 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response, |
| 432 int /* request_id */, | 441 int /* request_id */, |
| 433 bool /* success */, | 442 bool /* success */, |
| 434 base::ListValue /* response wrapper (see comment above) */, | 443 base::ListValue /* response wrapper (see comment above) */, |
| 435 std::string /* error */) | 444 std::string /* error */) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 514 int /* id of browser window */) | 523 int /* id of browser window */) |
| 515 | 524 |
| 516 // Tell the render view what its tab ID is. | 525 // Tell the render view what its tab ID is. |
| 517 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, | 526 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, |
| 518 int /* id of tab */) | 527 int /* id of tab */) |
| 519 | 528 |
| 520 // Tell the renderer to update an extension's permission set. | 529 // Tell the renderer to update an extension's permission set. |
| 521 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePermissions, | 530 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePermissions, |
| 522 ExtensionMsg_UpdatePermissions_Params) | 531 ExtensionMsg_UpdatePermissions_Params) |
| 523 | 532 |
| 533 // Tell the renderer to update an extension's runtime_blocked_hosts set. | |
| 534 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePolicy, | |
|
asargent_no_longer_on_chrome
2016/11/23 01:19:23
"UpdatePolicy" is a little ambiguous of a name her
nrpeter
2017/01/02 19:57:45
Done.
| |
| 535 ExtensionMsg_UpdatePolicy_Params) | |
| 536 | |
| 524 // Tell the render view about new tab-specific permissions for an extension. | 537 // Tell the render view about new tab-specific permissions for an extension. |
| 525 IPC_MESSAGE_CONTROL5(ExtensionMsg_UpdateTabSpecificPermissions, | 538 IPC_MESSAGE_CONTROL5(ExtensionMsg_UpdateTabSpecificPermissions, |
| 526 GURL /* url */, | 539 GURL /* url */, |
| 527 std::string /* extension_id */, | 540 std::string /* extension_id */, |
| 528 extensions::URLPatternSet /* hosts */, | 541 extensions::URLPatternSet /* hosts */, |
| 529 bool /* update origin whitelist */, | 542 bool /* update origin whitelist */, |
| 530 int /* tab_id */) | 543 int /* tab_id */) |
| 531 | 544 |
| 532 // Tell the render view to clear tab-specific permissions for some extensions. | 545 // Tell the render view to clear tab-specific permissions for some extensions. |
| 533 IPC_MESSAGE_CONTROL3(ExtensionMsg_ClearTabSpecificPermissions, | 546 IPC_MESSAGE_CONTROL3(ExtensionMsg_ClearTabSpecificPermissions, |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 894 int64_t /* service_worker_version_id */, | 907 int64_t /* service_worker_version_id */, |
| 895 std::string /* request_uuid */) | 908 std::string /* request_uuid */) |
| 896 | 909 |
| 897 // Asks the browser to decrement the pending activity count for | 910 // Asks the browser to decrement the pending activity count for |
| 898 // the worker with version id |service_worker_version_id|. | 911 // the worker with version id |service_worker_version_id|. |
| 899 // |request_uuid| must match the GUID of a previous request, otherwise the | 912 // |request_uuid| must match the GUID of a previous request, otherwise the |
| 900 // browser process ignores the IPC. | 913 // browser process ignores the IPC. |
| 901 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, | 914 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, |
| 902 int64_t /* service_worker_version_id */, | 915 int64_t /* service_worker_version_id */, |
| 903 std::string /* request_uuid */) | 916 std::string /* request_uuid */) |
| OLD | NEW |