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

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

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address first round review comments and fix test build failure Created 6 years, 5 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "content/public/common/common_param_traits.h" 13 #include "content/public/common/common_param_traits.h"
14 #include "content/public/common/socket_permission_request.h" 14 #include "content/public/common/socket_permission_request.h"
15 #include "extensions/common/api/messaging/message.h" 15 #include "extensions/common/api/messaging/message.h"
16 #include "extensions/common/draggable_region.h" 16 #include "extensions/common/draggable_region.h"
17 #include "extensions/common/extension.h" 17 #include "extensions/common/extension.h"
18 #include "extensions/common/extensions_client.h" 18 #include "extensions/common/extensions_client.h"
19 #include "extensions/common/permissions/media_galleries_permission_data.h" 19 #include "extensions/common/permissions/media_galleries_permission_data.h"
20 #include "extensions/common/permissions/permission_set.h" 20 #include "extensions/common/permissions/permission_set.h"
21 #include "extensions/common/permissions/socket_permission_data.h" 21 #include "extensions/common/permissions/socket_permission_data.h"
22 #include "extensions/common/permissions/usb_device_permission_data.h" 22 #include "extensions/common/permissions/usb_device_permission_data.h"
23 #include "extensions/common/url_pattern.h" 23 #include "extensions/common/url_pattern.h"
24 #include "extensions/common/url_pattern_set.h" 24 #include "extensions/common/url_pattern_set.h"
25 #include "extensions/common/view_type.h" 25 #include "extensions/common/view_type.h"
26 #include "extensions/common/watched_pages_recipient.h"
26 #include "ipc/ipc_message_macros.h" 27 #include "ipc/ipc_message_macros.h"
27 #include "url/gurl.h" 28 #include "url/gurl.h"
28 29
29 #define IPC_MESSAGE_START ExtensionMsgStart 30 #define IPC_MESSAGE_START ExtensionMsgStart
30 31
31 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST) 32 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST)
32 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, 33 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType,
33 content::SocketPermissionRequest::OPERATION_TYPE_LAST) 34 content::SocketPermissionRequest::OPERATION_TYPE_LAST)
35 IPC_ENUM_TRAITS_MAX_VALUE(extensions::WatchedPagesRecipient,
36 extensions::WATCHED_PAGES_RECIPIENT_LAST)
34 37
35 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and 38 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and
36 // ExtensionHostMsg_AddEventToActivityLog. 39 // ExtensionHostMsg_AddEventToActivityLog.
37 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) 40 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params)
38 // API name. 41 // API name.
39 IPC_STRUCT_MEMBER(std::string, api_call) 42 IPC_STRUCT_MEMBER(std::string, api_call)
40 43
41 // List of arguments. 44 // List of arguments.
42 IPC_STRUCT_MEMBER(base::ListValue, arguments) 45 IPC_STRUCT_MEMBER(base::ListValue, arguments)
43 46
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 content::ConsoleMessageLevel /* level */, 449 content::ConsoleMessageLevel /* level */,
447 std::string /* message */) 450 std::string /* message */)
448 451
449 // Notify the renderer that its window has closed. 452 // Notify the renderer that its window has closed.
450 IPC_MESSAGE_ROUTED0(ExtensionMsg_AppWindowClosed) 453 IPC_MESSAGE_ROUTED0(ExtensionMsg_AppWindowClosed)
451 454
452 // Notify the renderer that an extension wants notifications when certain 455 // Notify the renderer that an extension wants notifications when certain
453 // searches match the active page. This message replaces the old set of 456 // searches match the active page. This message replaces the old set of
454 // searches, and triggers ExtensionHostMsg_OnWatchedPageChange messages from 457 // searches, and triggers ExtensionHostMsg_OnWatchedPageChange messages from
455 // each tab to keep the browser updated about changes. 458 // each tab to keep the browser updated about changes.
456 IPC_MESSAGE_CONTROL1(ExtensionMsg_WatchPages, 459 IPC_MESSAGE_CONTROL3(ExtensionMsg_WatchPages,
460 std::string, /* event_name */
461 extensions::WatchedPagesRecipient,
457 std::vector<std::string> /* CSS selectors */) 462 std::vector<std::string> /* CSS selectors */)
458 463
459 // Send by the browser to indicate a Blob handle has been transferred to the 464 // Send by the browser to indicate a Blob handle has been transferred to the
460 // renderer. This is sent after the actual extension response, and depends on 465 // renderer. This is sent after the actual extension response, and depends on
461 // the sequential nature of IPCs so that the blob has already been caught. 466 // the sequential nature of IPCs so that the blob has already been caught.
462 // This is a separate control message, so that the renderer process will send 467 // This is a separate control message, so that the renderer process will send
463 // an acknowledgement even if the RenderView has closed or navigated away. 468 // an acknowledgement even if the RenderView has closed or navigated away.
464 IPC_MESSAGE_CONTROL1(ExtensionMsg_TransferBlobs, 469 IPC_MESSAGE_CONTROL1(ExtensionMsg_TransferBlobs,
465 std::vector<std::string> /* blob_uuids */) 470 std::vector<std::string> /* blob_uuids */)
466 471
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 659
655 // Notifies the browser process that a tab has started or stopped matching 660 // Notifies the browser process that a tab has started or stopped matching
656 // certain conditions. This message is sent in response to several events: 661 // certain conditions. This message is sent in response to several events:
657 // 662 //
658 // * ExtensionMsg_WatchPages was received, updating the set of conditions. 663 // * ExtensionMsg_WatchPages was received, updating the set of conditions.
659 // * A new page is loaded. This will be sent after 664 // * A new page is loaded. This will be sent after
660 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the 665 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the
661 // main frame. 666 // main frame.
662 // * Something changed on an existing frame causing the set of matching searches 667 // * Something changed on an existing frame causing the set of matching searches
663 // to change. 668 // to change.
664 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, 669 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_OnWatchedPageChange,
670 std::string, /* event_name */
665 std::vector<std::string> /* Matching CSS selectors */) 671 std::vector<std::string> /* Matching CSS selectors */)
666 672
667 // Sent by the renderer when it has received a Blob handle from the browser. 673 // Sent by the renderer when it has received a Blob handle from the browser.
668 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_TransferBlobsAck, 674 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_TransferBlobsAck,
669 std::vector<std::string> /* blob_uuids */) 675 std::vector<std::string> /* blob_uuids */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698