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 // Defines the IPC messages used by the automation interface. | 5 // Defines the IPC messages used by the automation interface. |
6 | 6 |
7 // NOTE: All IPC messages have either a routing_id of 0 (for asynchronous | 7 // NOTE: All IPC messages have either a routing_id of 0 (for asynchronous |
8 // messages), or one that's been assigned by the proxy (for calls | 8 // messages), or one that's been assigned by the proxy (for calls |
9 // which expect a response). The routing_id shouldn't be used for | 9 // which expect a response). The routing_id shouldn't be used for |
10 // any other purpose in these message types. | 10 // any other purpose in these message types. |
11 | 11 |
12 // NOTE: All the new IPC messages should go at the end. | 12 // NOTE: All the new IPC messages should go at the end. |
13 // The test <--> browser IPC message IDs need to match the reference | 13 // The test <--> browser IPC message IDs need to match the reference |
14 // builds. Since we now define the IDs based on __LINE__, to allow these | 14 // builds. Since we now define the IDs based on __LINE__, to allow these |
15 // IPC messages to be used to control an old version of Chrome we need | 15 // IPC messages to be used to control an old version of Chrome we need |
16 // the message IDs to remain the same. This means that you should not | 16 // the message IDs to remain the same. This means that you should not |
17 // change the line number of these types of messages. You can, however, | 17 // change the line number of these types of messages. |
18 // change the browser <--> renderer messages. | 18 |
19 | 19 |
20 #define IPC_MESSAGE_START AutomationMsgStart | 20 #define IPC_MESSAGE_START AutomationMsgStart |
21 | 21 |
22 // This message is fired when the AutomationProvider is up and running | 22 // This message is fired when the AutomationProvider is up and running |
23 // in the app (the app is not fully up at this point). The parameter to this | 23 // in the app (the app is not fully up at this point). The parameter to this |
24 // message is the version string of the automation provider. This parameter | 24 // message is the version string of the automation provider. This parameter |
25 // is defined to be the version string as returned by | 25 // is defined to be the version string as returned by |
26 // chrome::VersionInfo::Version(). | 26 // chrome::VersionInfo::Version(). |
27 // The client can choose to use this version string to decide whether or not | 27 // The client can choose to use this version string to decide whether or not |
28 // it can talk to the provider. | 28 // it can talk to the provider. |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 std::string /* JSON response */, | 958 std::string /* JSON response */, |
959 bool /* success */) | 959 bool /* success */) |
960 | 960 |
961 // This message requests that a key press be performed. | 961 // This message requests that a key press be performed. |
962 // Request: | 962 // Request: |
963 // int - tab handle | 963 // int - tab handle |
964 // int - the ui::KeyboardCode of the key that was pressed. | 964 // int - the ui::KeyboardCode of the key that was pressed. |
965 IPC_MESSAGE_CONTROL2(AutomationMsg_KeyPress, | 965 IPC_MESSAGE_CONTROL2(AutomationMsg_KeyPress, |
966 int /* tab_handle */, | 966 int /* tab_handle */, |
967 int /* key */) | 967 int /* key */) |
968 | |
969 // Browser -> renderer messages. | |
970 | |
971 // Requests a snapshot. | |
972 IPC_MESSAGE_ROUTED0(AutomationMsg_SnapshotEntirePage) | |
973 | |
974 #if !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) | |
975 // Requests to dump a heap profile. | |
976 IPC_MESSAGE_ROUTED1(AutomationMsg_HeapProfilerDump, | |
977 std::string /* reason */) | |
978 #endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) | |
979 | |
980 // Requests processing of the given mouse event. | |
981 IPC_MESSAGE_ROUTED1(AutomationMsg_ProcessMouseEvent, | |
982 AutomationMouseEvent) | |
983 | |
984 // Renderer -> browser messages. | |
985 | |
986 // Sent as a response to |AutomationMsg_Snapshot|. | |
987 IPC_MESSAGE_ROUTED3(AutomationMsg_SnapshotEntirePageACK, | |
988 bool /* success */, | |
989 std::vector<unsigned char> /* png bytes */, | |
990 std::string /* error message */) | |
991 | |
992 // Sent when the renderer has scheduled a client redirect to occur. | |
993 IPC_MESSAGE_ROUTED2(AutomationMsg_WillPerformClientRedirect, | |
994 int64 /* frame_id */, | |
995 double /* # of seconds till redirect will be performed */) | |
996 | |
997 // Sent when the renderer has completed or canceled a client redirect for a | |
998 // particular frame. This message may be sent multiple times for the same | |
999 // redirect. | |
1000 IPC_MESSAGE_ROUTED1(AutomationMsg_DidCompleteOrCancelClientRedirect, | |
1001 int64 /* frame_id */) | |
1002 | |
1003 // Sent right before processing a mouse event at the given point. | |
1004 // This is needed in addition to AutomationMsg_ProcessMouseEventACK so that | |
1005 // the client knows where the event occurred even if the event causes a modal | |
1006 // dialog to appear which blocks further messages. | |
1007 IPC_MESSAGE_ROUTED1(AutomationMsg_WillProcessMouseEventAt, | |
1008 gfx::Point) | |
1009 | |
1010 // Sent when the automation mouse event has been processed. | |
1011 IPC_MESSAGE_ROUTED2(AutomationMsg_ProcessMouseEventACK, | |
1012 bool /* success */, | |
1013 std::string /* error message */) | |
1014 | |
1015 // YOUR NEW MESSAGE MIGHT NOT BELONG HERE. | |
1016 // This is the section for renderer -> browser automation messages. If it is | |
1017 // an automation <-> browser message, put it above this section. The "no line | |
1018 // number change" applies only to the automation <-> browser messages. | |
OLD | NEW |