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
3 // found in the LICENSE file.
5 // IPC messages for extensions.
6 // Multiply-included message file, hence no include guard.
11 #include "base/memory/shared_memory.h"
12 #include "base/values.h"
13 #include "content/public/common/common_param_traits.h"
14 #include "content/public/common/socket_permission_request.h"
15 #include "extensions/common/api/messaging/message.h"
16 #include "extensions/common/draggable_region.h"
17 #include "extensions/common/extension.h"
18 #include "extensions/common/extensions_client.h"
19 #include "extensions/common/permissions/media_galleries_permission_data.h"
20 #include "extensions/common/permissions/permission_set.h"
21 #include "extensions/common/permissions/socket_permission_data.h"
22 #include "extensions/common/permissions/usb_device_permission_data.h"
23 #include "extensions/common/url_pattern.h"
24 #include "extensions/common/url_pattern_set.h"
25 #include "extensions/common/view_type.h"
26 #include "ipc/ipc_message_macros.h"
29 #define IPC_MESSAGE_START ExtensionMsgStart
31 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST)
32 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType,
33 content::SocketPermissionRequest::OPERATION_TYPE_LAST)
35 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and
36 // ExtensionHostMsg_AddEventToActivityLog.
37 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params)
39 IPC_STRUCT_MEMBER(std::string, api_call)
42 IPC_STRUCT_MEMBER(base::ListValue, arguments)
44 // Extra logging information.
45 IPC_STRUCT_MEMBER(std::string, extra)
48 // Parameters structure for ExtensionHostMsg_AddDOMActionToActivityLog.
49 IPC_STRUCT_BEGIN(ExtensionHostMsg_DOMAction_Params)
51 IPC_STRUCT_MEMBER(GURL, url)
54 IPC_STRUCT_MEMBER(base::string16, url_title)
57 IPC_STRUCT_MEMBER(std::string, api_call)
60 IPC_STRUCT_MEMBER(base::ListValue, arguments)
62 // Type of DOM API call.
63 IPC_STRUCT_MEMBER(int, call_type)
66 // Parameters structure for ExtensionHostMsg_Request.
67 IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params)
69 IPC_STRUCT_MEMBER(std::string, name)
71 // List of message arguments.
72 IPC_STRUCT_MEMBER(base::ListValue, arguments)
74 // Extension ID this request was sent from. This can be empty, in the case
75 // where we expose APIs to normal web pages using the extension function
77 IPC_STRUCT_MEMBER(std::string, extension_id)
79 // URL of the frame the request was sent from. This isn't necessarily an
80 // extension url. Extension requests can also originate from content scripts,
81 // in which case extension_id will indicate the ID of the associated
82 // extension. Or, they can originate from hosted apps or normal web pages.
83 IPC_STRUCT_MEMBER(GURL, source_url)
85 // The id of the tab that sent this request, or -1 if there is no source tab.
86 IPC_STRUCT_MEMBER(int, source_tab_id)
88 // Unique request id to match requests and responses.
89 IPC_STRUCT_MEMBER(int, request_id)
91 // True if request has a callback specified.
92 IPC_STRUCT_MEMBER(bool, has_callback)
94 // True if request is executed in response to an explicit user gesture.
95 IPC_STRUCT_MEMBER(bool, user_gesture)
98 // Allows an extension to execute code in a tab.
99 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params)
100 // The extension API request id, for responding.
101 IPC_STRUCT_MEMBER(int, request_id)
103 // The ID of the requesting extension. To know which isolated world to
104 // execute the code inside of.
105 IPC_STRUCT_MEMBER(std::string, extension_id)
107 // Whether the code is JavaScript or CSS.
108 IPC_STRUCT_MEMBER(bool, is_javascript)
110 // String of code to execute.
111 IPC_STRUCT_MEMBER(std::string, code)
113 // The webview guest source who calls to execute code.
114 IPC_STRUCT_MEMBER(GURL, webview_src)
116 // Whether to inject into all frames, or only the root frame.
117 IPC_STRUCT_MEMBER(bool, all_frames)
119 // When to inject the code.
120 IPC_STRUCT_MEMBER(int, run_at)
122 // Whether to execute code in the main world (as opposed to an isolated
124 IPC_STRUCT_MEMBER(bool, in_main_world)
126 // Whether the request is coming from a <webview>.
127 IPC_STRUCT_MEMBER(bool, is_web_view)
129 // Whether the caller is interested in the result value. Manifest-declared
130 // content scripts and executeScript() calls without a response callback
131 // are examples of when this will be false.
132 IPC_STRUCT_MEMBER(bool, wants_result)
134 // The URL of the file that was injected, if any.
135 IPC_STRUCT_MEMBER(GURL, file_url)
137 // Whether the code to be executed should be associated with a user gesture.
138 IPC_STRUCT_MEMBER(bool, user_gesture)
141 // Struct containing the data for external connections to extensions. Used to
142 // handle the IPCs initiated by both connect() and onConnect().
143 IPC_STRUCT_BEGIN(ExtensionMsg_ExternalConnectionInfo)
144 // The ID of the extension that is the target of the request.
145 IPC_STRUCT_MEMBER(std::string, target_id)
147 // The ID of the extension that initiated the request. May be empty if it
148 // wasn't initiated by an extension.
149 IPC_STRUCT_MEMBER(std::string, source_id)
151 // The URL of the frame that initiated the request.
152 IPC_STRUCT_MEMBER(GURL, source_url)
155 // Parameters structure for ExtensionMsg_UpdatePermissions.
156 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params)
157 IPC_STRUCT_MEMBER(int /* UpdateExtensionPermissionsInfo::REASON */, reason_id)
158 IPC_STRUCT_MEMBER(std::string, extension_id)
159 IPC_STRUCT_MEMBER(extensions::APIPermissionSet, apis)
160 IPC_STRUCT_MEMBER(extensions::ManifestPermissionSet, manifest_permissions)
161 IPC_STRUCT_MEMBER(extensions::URLPatternSet, explicit_hosts)
162 IPC_STRUCT_MEMBER(extensions::URLPatternSet, scriptable_hosts)
165 IPC_STRUCT_TRAITS_BEGIN(extensions::DraggableRegion)
166 IPC_STRUCT_TRAITS_MEMBER(draggable)
167 IPC_STRUCT_TRAITS_MEMBER(bounds)
168 IPC_STRUCT_TRAITS_END()
170 IPC_STRUCT_TRAITS_BEGIN(content::SocketPermissionRequest)
171 IPC_STRUCT_TRAITS_MEMBER(type)
172 IPC_STRUCT_TRAITS_MEMBER(host)
173 IPC_STRUCT_TRAITS_MEMBER(port)
174 IPC_STRUCT_TRAITS_END()
176 IPC_STRUCT_TRAITS_BEGIN(extensions::SocketPermissionEntry)
177 IPC_STRUCT_TRAITS_MEMBER(pattern_)
178 IPC_STRUCT_TRAITS_MEMBER(match_subdomains_)
179 IPC_STRUCT_TRAITS_END()
181 IPC_STRUCT_TRAITS_BEGIN(extensions::SocketPermissionData)
182 IPC_STRUCT_TRAITS_MEMBER(entry())
183 IPC_STRUCT_TRAITS_END()
185 IPC_STRUCT_TRAITS_BEGIN(extensions::UsbDevicePermissionData)
186 IPC_STRUCT_TRAITS_MEMBER(vendor_id())
187 IPC_STRUCT_TRAITS_MEMBER(product_id())
188 IPC_STRUCT_TRAITS_END()
190 IPC_STRUCT_TRAITS_BEGIN(extensions::MediaGalleriesPermissionData)
191 IPC_STRUCT_TRAITS_MEMBER(permission())
192 IPC_STRUCT_TRAITS_END()
194 IPC_STRUCT_TRAITS_BEGIN(extensions::Message)
195 IPC_STRUCT_TRAITS_MEMBER(data)
196 IPC_STRUCT_TRAITS_MEMBER(user_gesture)
197 IPC_STRUCT_TRAITS_END()
199 // Singly-included section for custom IPC traits.
200 #ifndef EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_
201 #define EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_
203 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
204 // to typedef it to avoid that.
205 // Substitution map for l10n messages.
206 typedef std::map<std::string, std::string> SubstitutionMap;
208 // Map of extensions IDs to the executing script paths.
209 typedef std::map<std::string, std::set<std::string> > ExecutingScriptsMap;
211 struct ExtensionMsg_Loaded_Params {
212 ExtensionMsg_Loaded_Params();
213 ~ExtensionMsg_Loaded_Params();
214 explicit ExtensionMsg_Loaded_Params(const extensions::Extension* extension);
216 // Creates a new extension from the data in this object.
217 scoped_refptr<extensions::Extension> ConvertToExtension(
218 std::string* error) const;
220 // The subset of the extension manifest data we send to renderers.
221 linked_ptr<base::DictionaryValue> manifest;
223 // The location the extension was installed from.
224 extensions::Manifest::Location location;
226 // The path the extension was loaded from. This is used in the renderer only
227 // to generate the extension ID for extensions that are loaded unpacked.
230 // The extension's active permissions.
231 extensions::APIPermissionSet apis;
232 extensions::ManifestPermissionSet manifest_permissions;
233 extensions::URLPatternSet explicit_hosts;
234 extensions::URLPatternSet scriptable_hosts;
236 // We keep this separate so that it can be used in logging.
239 // Send creation flags so extension is initialized identically.
246 struct ParamTraits<URLPattern> {
247 typedef URLPattern param_type;
248 static void Write(Message* m, const param_type& p);
249 static bool Read(const Message* m, PickleIterator* iter, param_type* p);
250 static void Log(const param_type& p, std::string* l);
254 struct ParamTraits<extensions::URLPatternSet> {
255 typedef extensions::URLPatternSet param_type;
256 static void Write(Message* m, const param_type& p);
257 static bool Read(const Message* m, PickleIterator* iter, param_type* p);
258 static void Log(const param_type& p, std::string* l);
262 struct ParamTraits<extensions::APIPermission::ID> {
263 typedef extensions::APIPermission::ID param_type;
264 static void Write(Message* m, const param_type& p);
265 static bool Read(const Message* m, PickleIterator* iter, param_type* p);
266 static void Log(const param_type& p, std::string* l);
270 struct ParamTraits<extensions::APIPermissionSet> {
271 typedef extensions::APIPermissionSet param_type;
272 static void Write(Message* m, const param_type& p);
273 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
274 static void Log(const param_type& p, std::string* l);
278 struct ParamTraits<extensions::ManifestPermissionSet> {
279 typedef extensions::ManifestPermissionSet param_type;
280 static void Write(Message* m, const param_type& p);
281 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
282 static void Log(const param_type& p, std::string* l);
286 struct ParamTraits<ExtensionMsg_Loaded_Params> {
287 typedef ExtensionMsg_Loaded_Params param_type;
288 static void Write(Message* m, const param_type& p);
289 static bool Read(const Message* m, PickleIterator* iter, param_type* p);
290 static void Log(const param_type& p, std::string* l);
295 #endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_
297 // Messages sent from the browser to the renderer.
299 // The browser sends this message in response to all extension api calls. The
300 // response data (if any) is one of the base::Value subclasses, wrapped as the
301 // first element in a ListValue.
302 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response,
303 int /* request_id */,
305 base::ListValue /* response wrapper (see comment above) */,
306 std::string /* error */)
308 // This message is optionally routed. If used as a control message, it will
309 // call a javascript function |function_name| from module |module_name| in
310 // every registered context in the target process. If routed, it will be
311 // restricted to the contexts that are part of the target RenderView.
313 // If |extension_id| is non-empty, the function will be invoked only in
314 // contexts owned by the extension. |args| is a list of primitive Value types
315 // that are passed to the function.
316 IPC_MESSAGE_ROUTED5(ExtensionMsg_MessageInvoke,
317 std::string /* extension_id */,
318 std::string /* module_name */,
319 std::string /* function_name */,
320 base::ListValue /* args */,
321 bool /* delivered as part of a user gesture */)
323 // Tell the renderer process all known extension function names.
324 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetFunctionNames,
325 std::vector<std::string>)
327 // Tell the renderer process the platforms system font.
328 IPC_MESSAGE_CONTROL2(ExtensionMsg_SetSystemFont,
329 std::string /* font_family */,
330 std::string /* font_size */)
332 // Marks an extension as 'active' in an extension process. 'Active' extensions
333 // have more privileges than other extension content that might end up running
334 // in the process (e.g. because of iframes or content scripts).
335 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateExtension,
336 std::string /* extension_id */)
338 // Notifies the renderer that extensions were loaded in the browser.
339 IPC_MESSAGE_CONTROL1(ExtensionMsg_Loaded,
340 std::vector<ExtensionMsg_Loaded_Params>)
342 // Notifies the renderer that an extension was unloaded in the browser.
343 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unloaded,
346 // Updates the scripting whitelist for extensions in the render process. This is
347 // only used for testing.
348 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetScriptingWhitelist,
350 extensions::ExtensionsClient::ScriptingWhitelist)
352 // Notification that renderer should run some JavaScript code.
353 IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode,
354 ExtensionMsg_ExecuteCode_Params)
356 // Notification that the user scripts have been updated. It has one
357 // SharedMemoryHandle argument consisting of the pickled script data. This
358 // handle is valid in the context of the renderer.
359 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateUserScripts,
360 base::SharedMemoryHandle)
362 // Tell the render view which browser window it's being attached to.
363 IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId,
364 int /* id of browser window */)
366 // Tell the render view what its tab ID is.
367 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId,
370 // Tell the renderer to update an extension's permission set.
371 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePermissions,
372 ExtensionMsg_UpdatePermissions_Params)
374 // Tell the renderer about new tab-specific permissions for an extension.
375 IPC_MESSAGE_CONTROL4(ExtensionMsg_UpdateTabSpecificPermissions,
376 int32 /* page_id (only relevant for the target tab) */,
378 std::string /* extension_id */,
379 extensions::URLPatternSet /* hosts */)
381 // Tell the renderer to clear tab-specific permissions for some extensions.
382 IPC_MESSAGE_CONTROL2(ExtensionMsg_ClearTabSpecificPermissions,
384 std::vector<std::string> /* extension_ids */)
386 // Tell the renderer which type this view is.
387 IPC_MESSAGE_ROUTED1(ExtensionMsg_NotifyRenderViewType,
388 extensions::ViewType /* view_type */)
390 // Deliver a message sent with ExtensionHostMsg_PostMessage.
391 IPC_MESSAGE_CONTROL3(ExtensionMsg_UsingWebRequestAPI,
393 bool /* adblock_plus */,
394 bool /* other_webrequest */)
396 // Ask the lazy background page if it is ready to be suspended. This is sent
397 // when the page is considered idle. The renderer will reply with the same
398 // sequence_id so that we can tell which message it is responding to.
399 IPC_MESSAGE_CONTROL2(ExtensionMsg_ShouldSuspend,
400 std::string /* extension_id */,
401 int /* sequence_id */)
403 // If we complete a round of ShouldSuspend->ShouldSuspendAck messages without
404 // the lazy background page becoming active again, we are ready to unload. This
405 // message tells the page to dispatch the suspend event.
406 IPC_MESSAGE_CONTROL1(ExtensionMsg_Suspend,
407 std::string /* extension_id */)
409 // The browser changed its mind about suspending this extension.
410 IPC_MESSAGE_CONTROL1(ExtensionMsg_CancelSuspend,
411 std::string /* extension_id */)
413 // Response to the renderer for ExtensionHostMsg_GetAppInstallState.
414 IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse,
415 std::string /* state */,
416 int32 /* callback_id */)
418 // Dispatch the Port.onConnect event for message channels.
419 IPC_MESSAGE_ROUTED5(ExtensionMsg_DispatchOnConnect,
420 int /* target_port_id */,
421 std::string /* channel_name */,
422 base::DictionaryValue /* source_tab */,
423 ExtensionMsg_ExternalConnectionInfo,
424 std::string /* tls_channel_id */)
426 // Deliver a message sent with ExtensionHostMsg_PostMessage.
427 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage,
428 int /* target_port_id */,
431 // Dispatch the Port.onDisconnect event for message channels.
432 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect,
434 std::string /* error_message */)
436 // Informs the renderer what channel (dev, beta, stable, etc) is running.
437 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetChannel,
440 // Adds a logging message to the renderer's root frame DevTools console.
441 IPC_MESSAGE_ROUTED2(ExtensionMsg_AddMessageToConsole,
442 content::ConsoleMessageLevel /* level */,
443 std::string /* message */)
445 // Notify the renderer that its window has closed.
446 IPC_MESSAGE_ROUTED0(ExtensionMsg_AppWindowClosed)
448 // Notify the renderer that an extension wants notifications when certain
449 // searches match the active page. This message replaces the old set of
450 // searches, and triggers ExtensionHostMsg_OnWatchedPageChange messages from
451 // each tab to keep the browser updated about changes.
452 IPC_MESSAGE_CONTROL1(ExtensionMsg_WatchPages,
453 std::vector<std::string> /* CSS selectors */)
455 // Messages sent from the renderer to the browser.
457 // A renderer sends this message when an extension process starts an API
458 // request. The browser will always respond with a ExtensionMsg_Response.
459 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request,
460 ExtensionHostMsg_Request_Params)
462 // A renderer sends this message when an extension process starts an API
463 // request. The browser will always respond with a ExtensionMsg_Response.
464 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread,
465 int /* routing_id */,
466 ExtensionHostMsg_Request_Params)
468 // Notify the browser that the given extension added a listener to an event.
469 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddListener,
470 std::string /* extension_id */,
471 std::string /* name */)
473 // Notify the browser that the given extension removed a listener from an
475 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveListener,
476 std::string /* extension_id */,
477 std::string /* name */)
479 // Notify the browser that the given extension added a listener to an event from
480 // a lazy background page.
481 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddLazyListener,
482 std::string /* extension_id */,
483 std::string /* name */)
485 // Notify the browser that the given extension is no longer interested in
486 // receiving the given event from a lazy background page.
487 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveLazyListener,
488 std::string /* extension_id */,
489 std::string /* name */)
491 // Notify the browser that the given extension added a listener to instances of
492 // the named event that satisfy the filter.
493 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_AddFilteredListener,
494 std::string /* extension_id */,
495 std::string /* name */,
496 base::DictionaryValue /* filter */,
499 // Notify the browser that the given extension is no longer interested in
500 // instances of the named event that satisfy the filter.
501 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_RemoveFilteredListener,
502 std::string /* extension_id */,
503 std::string /* name */,
504 base::DictionaryValue /* filter */,
507 // Notify the browser that an event has finished being dispatched.
508 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_EventAck)
510 // Open a channel to all listening contexts owned by the extension with
511 // the given ID. This always returns a valid port ID which can be used for
512 // sending messages. If an error occurred, the opener will be notified
514 IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToExtension,
515 int /* routing_id */,
516 ExtensionMsg_ExternalConnectionInfo,
517 std::string /* channel_name */,
518 bool /* include_tls_channel_id */,
521 IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp,
522 int /* routing_id */,
523 std::string /* source_extension_id */,
524 std::string /* native_app_name */,
527 // Get a port handle to the given tab. The handle can be used for sending
528 // messages to the extension.
529 IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToTab,
530 int /* routing_id */,
532 std::string /* extension_id */,
533 std::string /* channel_name */,
536 // Send a message to an extension process. The handle is the value returned
537 // by ViewHostMsg_OpenChannelTo*.
538 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage,
542 // Send a message to an extension process. The handle is the value returned
543 // by ViewHostMsg_OpenChannelTo*.
544 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_CloseChannel,
546 std::string /* error_message */)
548 // Used to get the extension message bundle.
549 IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle,
550 std::string /* extension id */,
551 SubstitutionMap /* message bundle */)
553 // Sent from the renderer to the browser to return the script running result.
555 ExtensionHostMsg_ExecuteCodeFinished,
556 int /* request id */,
557 std::string /* error; empty implies success */,
558 int32 /* page_id the code executed on. May be -1 if unsuccessful */,
559 GURL /* URL of the code executed on. May be empty if unsuccessful. */,
560 base::ListValue /* result of the script */)
562 // Sent from the renderer to the browser to notify that content scripts are
563 // running in the renderer that the IPC originated from.
564 // Note that the page_id is for the parent (or more accurately the topmost)
565 // frame (e.g. if executing in an iframe this is the page ID of the parent,
566 // unless the parent is an iframe... etc).
567 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting,
569 int32 /* page_id of the _topmost_ frame */,
570 GURL /* url of the _topmost_ frame */)
572 // Sent by the renderer when a web page is checking if its app is installed.
573 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_GetAppInstallState,
574 GURL /* requestor_url */,
575 int32 /* return_route_id */,
576 int32 /* callback_id */)
578 // Optional Ack message sent to the browser to notify that the response to a
579 // function has been processed.
580 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck,
581 int /* request_id */)
583 // Response to ExtensionMsg_ShouldSuspend.
584 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_ShouldSuspendAck,
585 std::string /* extension_id */,
586 int /* sequence_id */)
588 // Response to ExtensionMsg_Suspend, after we dispatch the suspend event.
589 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_SuspendAck,
590 std::string /* extension_id */)
592 // Informs the browser to increment the keepalive count for the lazy background
593 // page, keeping it alive.
594 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_IncrementLazyKeepaliveCount)
596 // Informs the browser there is one less thing keeping the lazy background page
598 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_DecrementLazyKeepaliveCount)
600 // Fetches a globally unique ID (for the lifetime of the browser) from the
602 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID,
605 // Resumes resource requests for a newly created app window.
606 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ResumeRequests, int /* route_id */)
608 // Sent by the renderer when the draggable regions are updated.
609 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_UpdateDraggableRegions,
610 std::vector<extensions::DraggableRegion> /* regions */)
612 // Sent by the renderer to log an API action to the extension activity log.
613 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddAPIActionToActivityLog,
614 std::string /* extension_id */,
615 ExtensionHostMsg_APIActionOrEvent_Params)
617 // Sent by the renderer to log an event to the extension activity log.
618 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddEventToActivityLog,
619 std::string /* extension_id */,
620 ExtensionHostMsg_APIActionOrEvent_Params)
622 // Sent by the renderer to log a DOM action to the extension activity log.
623 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddDOMActionToActivityLog,
624 std::string /* extension_id */,
625 ExtensionHostMsg_DOMAction_Params)
627 // Notifies the browser process that a tab has started or stopped matching
628 // certain conditions. This message is sent in response to several events:
630 // * ExtensionMsg_WatchPages was received, updating the set of conditions.
631 // * A new page is loaded. This will be sent after
632 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the
634 // * Something changed on an existing frame causing the set of matching searches
636 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange,
637 std::vector<std::string> /* Matching CSS selectors */)