Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1262)

Side by Side Diff: extensions/common/extension_messages.h

Issue 2241203003: Pass user session type to extension feature checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass user session type to extension renderer Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/shared_memory.h" 13 #include "base/memory/shared_memory.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "components/version_info/version_info.h" 15 #include "components/version_info/version_info.h"
16 #include "content/public/common/common_param_traits.h" 16 #include "content/public/common/common_param_traits.h"
17 #include "content/public/common/socket_permission_request.h" 17 #include "content/public/common/socket_permission_request.h"
18 #include "extensions/common/api/messaging/message.h" 18 #include "extensions/common/api/messaging/message.h"
19 #include "extensions/common/draggable_region.h" 19 #include "extensions/common/draggable_region.h"
20 #include "extensions/common/extension.h" 20 #include "extensions/common/extension.h"
21 #include "extensions/common/extensions_client.h" 21 #include "extensions/common/extensions_client.h"
22 #include "extensions/common/features/feature_session_type.h"
22 #include "extensions/common/host_id.h" 23 #include "extensions/common/host_id.h"
23 #include "extensions/common/permissions/media_galleries_permission_data.h" 24 #include "extensions/common/permissions/media_galleries_permission_data.h"
24 #include "extensions/common/permissions/permission_set.h" 25 #include "extensions/common/permissions/permission_set.h"
25 #include "extensions/common/permissions/socket_permission_data.h" 26 #include "extensions/common/permissions/socket_permission_data.h"
26 #include "extensions/common/permissions/usb_device_permission_data.h" 27 #include "extensions/common/permissions/usb_device_permission_data.h"
27 #include "extensions/common/stack_frame.h" 28 #include "extensions/common/stack_frame.h"
28 #include "extensions/common/url_pattern.h" 29 #include "extensions/common/url_pattern.h"
29 #include "extensions/common/url_pattern_set.h" 30 #include "extensions/common/url_pattern_set.h"
30 #include "extensions/common/user_script.h" 31 #include "extensions/common/user_script.h"
31 #include "extensions/common/view_type.h" 32 #include "extensions/common/view_type.h"
32 #include "ipc/ipc_message_macros.h" 33 #include "ipc/ipc_message_macros.h"
33 #include "url/gurl.h" 34 #include "url/gurl.h"
34 35
35 #define IPC_MESSAGE_START ExtensionMsgStart 36 #define IPC_MESSAGE_START ExtensionMsgStart
36 37
37 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST) 38 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST)
38 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, 39 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType,
39 content::SocketPermissionRequest::OPERATION_TYPE_LAST) 40 content::SocketPermissionRequest::OPERATION_TYPE_LAST)
40 41
41 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType, 42 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType,
42 extensions::UserScript::INJECTION_TYPE_LAST) 43 extensions::UserScript::INJECTION_TYPE_LAST)
43 44
44 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::RunLocation, 45 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::RunLocation,
45 extensions::UserScript::RUN_LOCATION_LAST - 1) 46 extensions::UserScript::RUN_LOCATION_LAST - 1)
46 47
47 IPC_ENUM_TRAITS_MAX_VALUE(HostID::HostType, HostID::HOST_TYPE_LAST) 48 IPC_ENUM_TRAITS_MAX_VALUE(HostID::HostType, HostID::HOST_TYPE_LAST)
48 IPC_ENUM_TRAITS_MAX_VALUE(version_info::Channel, version_info::Channel::STABLE) 49 IPC_ENUM_TRAITS_MAX_VALUE(version_info::Channel, version_info::Channel::STABLE)
50 IPC_ENUM_TRAITS_MAX_VALUE(extensions::FeatureSessionType,
51 extensions::FEATURE_SESSION_TYPE_MAX)
49 52
50 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and 53 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and
51 // ExtensionHostMsg_AddEventToActivityLog. 54 // ExtensionHostMsg_AddEventToActivityLog.
52 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) 55 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params)
53 // API name. 56 // API name.
54 IPC_STRUCT_MEMBER(std::string, api_call) 57 IPC_STRUCT_MEMBER(std::string, api_call)
55 58
56 // List of arguments. 59 // List of arguments.
57 IPC_STRUCT_MEMBER(base::ListValue, arguments) 60 IPC_STRUCT_MEMBER(base::ListValue, arguments)
58 61
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 // the sequential nature of IPCs so that the blob has already been caught. 612 // the sequential nature of IPCs so that the blob has already been caught.
610 // This is a separate control message, so that the renderer process will send 613 // This is a separate control message, so that the renderer process will send
611 // an acknowledgement even if the RenderView has closed or navigated away. 614 // an acknowledgement even if the RenderView has closed or navigated away.
612 IPC_MESSAGE_CONTROL1(ExtensionMsg_TransferBlobs, 615 IPC_MESSAGE_CONTROL1(ExtensionMsg_TransferBlobs,
613 std::vector<std::string> /* blob_uuids */) 616 std::vector<std::string> /* blob_uuids */)
614 617
615 // Report the WebView partition ID to the WebView guest renderer process. 618 // Report the WebView partition ID to the WebView guest renderer process.
616 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetWebViewPartitionID, 619 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetWebViewPartitionID,
617 std::string /* webview_partition_id */) 620 std::string /* webview_partition_id */)
618 621
622 // Sent on renderer process startup to indicate the user session type in which
623 // the process is running.
624 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetUserSessionType,
625 extensions::FeatureSessionType)
626
619 // Messages sent from the renderer to the browser: 627 // Messages sent from the renderer to the browser:
620 628
621 // A renderer sends this message when an extension process starts an API 629 // A renderer sends this message when an extension process starts an API
622 // request. The browser will always respond with a ExtensionMsg_Response. 630 // request. The browser will always respond with a ExtensionMsg_Response.
623 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, 631 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request,
624 ExtensionHostMsg_Request_Params) 632 ExtensionHostMsg_Request_Params)
625 633
626 // A renderer sends this message when an extension process starts an API 634 // A renderer sends this message when an extension process starts an API
627 // request. The browser will always respond with a ExtensionMsg_Response. 635 // request. The browser will always respond with a ExtensionMsg_Response.
628 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, 636 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread,
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 878
871 // The browser sends this message in response to all service worker extension 879 // The browser sends this message in response to all service worker extension
872 // api calls. The response data (if any) is one of the base::Value subclasses, 880 // api calls. The response data (if any) is one of the base::Value subclasses,
873 // wrapped as the first element in a ListValue. 881 // wrapped as the first element in a ListValue.
874 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker, 882 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker,
875 int /* thread_id */, 883 int /* thread_id */,
876 int /* request_id */, 884 int /* request_id */,
877 bool /* success */, 885 bool /* success */,
878 base::ListValue /* response wrapper (see comment above) */, 886 base::ListValue /* response wrapper (see comment above) */,
879 std::string /* error */) 887 std::string /* error */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698