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