OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
| 9 #include <vector> |
| 10 |
8 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
9 #include "base/values.h" | 12 #include "base/values.h" |
10 #include "chrome/common/extensions/draggable_region.h" | 13 #include "chrome/common/extensions/draggable_region.h" |
11 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
12 #include "chrome/common/extensions/permissions/bluetooth_device_permission_data.
h" | 15 #include "chrome/common/extensions/permissions/bluetooth_device_permission_data.
h" |
13 #include "chrome/common/extensions/permissions/media_galleries_permission_data.h
" | 16 #include "chrome/common/extensions/permissions/media_galleries_permission_data.h
" |
14 #include "chrome/common/extensions/permissions/permission_set.h" | 17 #include "chrome/common/extensions/permissions/permission_set.h" |
15 #include "chrome/common/extensions/permissions/socket_permission_data.h" | 18 #include "chrome/common/extensions/permissions/socket_permission_data.h" |
16 #include "chrome/common/extensions/permissions/usb_device_permission_data.h" | 19 #include "chrome/common/extensions/permissions/usb_device_permission_data.h" |
17 #include "chrome/common/view_type.h" | 20 #include "chrome/common/view_type.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 int /* channel */) | 390 int /* channel */) |
388 | 391 |
389 // Adds a logging message to the renderer's root frame DevTools console. | 392 // Adds a logging message to the renderer's root frame DevTools console. |
390 IPC_MESSAGE_ROUTED2(ExtensionMsg_AddMessageToConsole, | 393 IPC_MESSAGE_ROUTED2(ExtensionMsg_AddMessageToConsole, |
391 content::ConsoleMessageLevel /* level */, | 394 content::ConsoleMessageLevel /* level */, |
392 std::string /* message */) | 395 std::string /* message */) |
393 | 396 |
394 // Notify the renderer that its window has closed. | 397 // Notify the renderer that its window has closed. |
395 IPC_MESSAGE_ROUTED0(ExtensionMsg_AppWindowClosed) | 398 IPC_MESSAGE_ROUTED0(ExtensionMsg_AppWindowClosed) |
396 | 399 |
| 400 // Notify the renderer that an extension wants notifications when certain |
| 401 // searches match the active page. This message replaces the old set of |
| 402 // searches, and triggers ExtensionHostMsg_OnWatchedPageChange messages from |
| 403 // each tab to keep the browser updated about changes. |
| 404 IPC_MESSAGE_CONTROL1(ExtensionMsg_WatchPages, |
| 405 std::vector<std::string> /* CSS selectors */) |
| 406 |
397 // Messages sent from the renderer to the browser. | 407 // Messages sent from the renderer to the browser. |
398 | 408 |
399 // A renderer sends this message when an extension process starts an API | 409 // A renderer sends this message when an extension process starts an API |
400 // request. The browser will always respond with a ExtensionMsg_Response. | 410 // request. The browser will always respond with a ExtensionMsg_Response. |
401 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, | 411 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, |
402 ExtensionHostMsg_Request_Params) | 412 ExtensionHostMsg_Request_Params) |
403 | 413 |
404 // A renderer sends this message when an extension process starts an API | 414 // A renderer sends this message when an extension process starts an API |
405 // request. The browser will always respond with a ExtensionMsg_Response. | 415 // request. The browser will always respond with a ExtensionMsg_Response. |
406 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, | 416 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 // browser process. | 579 // browser process. |
570 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, | 580 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, |
571 int /* unique_id */) | 581 int /* unique_id */) |
572 | 582 |
573 // Resumes resource requests for a newly created app window. | 583 // Resumes resource requests for a newly created app window. |
574 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ResumeRequests, int /* route_id */) | 584 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ResumeRequests, int /* route_id */) |
575 | 585 |
576 // Sent by the renderer when the draggable regions are updated. | 586 // Sent by the renderer when the draggable regions are updated. |
577 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_UpdateDraggableRegions, | 587 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_UpdateDraggableRegions, |
578 std::vector<extensions::DraggableRegion> /* regions */) | 588 std::vector<extensions::DraggableRegion> /* regions */) |
| 589 |
| 590 // Notifies the browser process that a tab has started or stopped matching |
| 591 // certain conditions. This message is sent in response to several events: |
| 592 // |
| 593 // * ExtensionMsg_WatchPages was received, updating the set of conditions. |
| 594 // * A new page is loaded. This will be sent after ViewHostMsg_FrameNavigate. |
| 595 // Currently this only fires for the main frame. |
| 596 // * Something changed on an existing frame causing the set of matching searches |
| 597 // to change. |
| 598 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, |
| 599 std::vector<std::string> /* Matching CSS selectors */) |
OLD | NEW |