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 // Developer tools consist of the following parts: | 5 // Developer tools consist of the following parts: |
6 // | 6 // |
7 // DevToolsAgent lives in the renderer of an inspected page and provides access | 7 // DevToolsAgent lives in the renderer of an inspected page and provides access |
8 // to the pages resources, DOM, v8 etc. by means of IPC messages. | 8 // to the pages resources, DOM, v8 etc. by means of IPC messages. |
9 // | 9 // |
10 // DevToolsClient is a thin delegate that lives in the tools front-end | 10 // DevToolsClient is a thin delegate that lives in the tools front-end |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 51 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
52 | 52 |
53 #define IPC_MESSAGE_START DevToolsMsgStart | 53 #define IPC_MESSAGE_START DevToolsMsgStart |
54 | 54 |
55 // These are messages sent from DevToolsAgent to DevToolsClient through the | 55 // These are messages sent from DevToolsAgent to DevToolsClient through the |
56 // browser. | 56 // browser. |
57 | 57 |
58 // Agent -> Client message chunk. | 58 // Agent -> Client message chunk. |
59 // |is_first| marks the first chunk, comes with the |message_size| for | 59 // |is_first| marks the first chunk, comes with the |message_size| for |
60 // total message size. | 60 // total message size. |
61 // |is_last| marks the last chunk. |call_id| and |post_state| are optional | 61 // |is_last| marks the last chunk. |call_id|, |session_id| and |post_state| |
62 // parameters passed with the last chunk of the protocol response. | 62 // are optional parameters passed with the last chunk of the protocol |
| 63 // response. |
63 IPC_STRUCT_BEGIN(DevToolsMessageChunk) | 64 IPC_STRUCT_BEGIN(DevToolsMessageChunk) |
64 IPC_STRUCT_MEMBER(bool, is_first) | 65 IPC_STRUCT_MEMBER(bool, is_first) |
65 IPC_STRUCT_MEMBER(bool, is_last) | 66 IPC_STRUCT_MEMBER(bool, is_last) |
66 IPC_STRUCT_MEMBER(int, message_size) | 67 IPC_STRUCT_MEMBER(int, message_size) |
| 68 IPC_STRUCT_MEMBER(int, session_id) |
67 IPC_STRUCT_MEMBER(int, call_id) | 69 IPC_STRUCT_MEMBER(int, call_id) |
68 IPC_STRUCT_MEMBER(std::string, data) | 70 IPC_STRUCT_MEMBER(std::string, data) |
69 IPC_STRUCT_MEMBER(std::string, post_state) | 71 IPC_STRUCT_MEMBER(std::string, post_state) |
70 IPC_STRUCT_END() | 72 IPC_STRUCT_END() |
71 | 73 |
72 // Sends response from the agent to the client. Supports chunked encoding. | 74 // Sends response from the agent to the client. Supports chunked encoding. |
73 IPC_MESSAGE_ROUTED1(DevToolsClientMsg_DispatchOnInspectorFrontend, | 75 IPC_MESSAGE_ROUTED1(DevToolsClientMsg_DispatchOnInspectorFrontend, |
74 DevToolsMessageChunk /* message */) | 76 DevToolsMessageChunk /* message */) |
75 | 77 |
76 //----------------------------------------------------------------------------- | 78 //----------------------------------------------------------------------------- |
77 // These are messages sent from DevToolsClient to DevToolsAgent through the | 79 // These are messages sent from DevToolsClient to DevToolsAgent through the |
78 // browser. | 80 // browser. |
79 // Tells agent that there is a client host connected to it. | 81 // Tells agent that there is a client host connected to it. |
80 IPC_MESSAGE_ROUTED1(DevToolsAgentMsg_Attach, | 82 IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_Attach, |
81 std::string /* host_id */) | 83 std::string /* host_id */, |
| 84 int /* session_id */) |
82 | 85 |
83 // Tells agent that a client host was disconnected from another agent and | 86 // Tells agent that a client host was disconnected from another agent and |
84 // connected to this one. | 87 // connected to this one. |
85 IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_Reattach, | 88 IPC_MESSAGE_ROUTED3(DevToolsAgentMsg_Reattach, |
86 std::string /* host_id */, | 89 std::string /* host_id */, |
| 90 int /* session_id */, |
87 std::string /* agent_state */) | 91 std::string /* agent_state */) |
88 | 92 |
89 // Tells agent that there is no longer a client host connected to it. | 93 // Tells agent that there is no longer a client host connected to it. |
90 IPC_MESSAGE_ROUTED0(DevToolsAgentMsg_Detach) | 94 IPC_MESSAGE_ROUTED0(DevToolsAgentMsg_Detach) |
91 | 95 |
92 // WebKit-level transport. | 96 // WebKit-level transport. |
93 IPC_MESSAGE_ROUTED1(DevToolsAgentMsg_DispatchOnInspectorBackend, | 97 IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_DispatchOnInspectorBackend, |
| 98 int /* session_id */, |
94 std::string /* message */) | 99 std::string /* message */) |
95 | 100 |
96 // Inspect element with the given coordinates. | 101 // Inspect element with the given coordinates. |
97 IPC_MESSAGE_ROUTED3(DevToolsAgentMsg_InspectElement, | 102 IPC_MESSAGE_ROUTED4(DevToolsAgentMsg_InspectElement, |
98 std::string /* host_id */, | 103 std::string /* host_id */, |
| 104 int /* session_id */, |
99 int /* x */, | 105 int /* x */, |
100 int /* y */) | 106 int /* y */) |
101 | 107 |
102 //----------------------------------------------------------------------------- | 108 //----------------------------------------------------------------------------- |
103 // These are messages sent from the browser to the renderer. | 109 // These are messages sent from the browser to the renderer. |
104 | 110 |
105 // RenderViewHostDelegate::RenderViewCreated method sends this message to a | 111 // RenderViewHostDelegate::RenderViewCreated method sends this message to a |
106 // new renderer to notify it that it will host developer tools UI and should | 112 // new renderer to notify it that it will host developer tools UI and should |
107 // set up all neccessary bindings and create DevToolsClient instance that | 113 // set up all neccessary bindings and create DevToolsClient instance that |
108 // will handle communication with inspected page DevToolsAgent. | 114 // will handle communication with inspected page DevToolsAgent. |
109 IPC_MESSAGE_ROUTED1(DevToolsMsg_SetupDevToolsClient, | 115 IPC_MESSAGE_ROUTED1(DevToolsMsg_SetupDevToolsClient, |
110 std::string /* compatibility script */) | 116 std::string /* compatibility script */) |
111 | 117 |
112 | 118 |
113 //----------------------------------------------------------------------------- | 119 //----------------------------------------------------------------------------- |
114 // These are messages sent from the renderer to the browser. | 120 // These are messages sent from the renderer to the browser. |
115 | 121 |
116 // Transport from Inspector frontend to frontend host. | 122 // Transport from Inspector frontend to frontend host. |
117 IPC_MESSAGE_ROUTED1(DevToolsHostMsg_DispatchOnEmbedder, | 123 IPC_MESSAGE_ROUTED1(DevToolsHostMsg_DispatchOnEmbedder, |
118 std::string /* message */) | 124 std::string /* message */) |
OLD | NEW |