srpcgen: Use 'const char*' for string parameters
[chromium-blink-merge.git] / content / common / devtools_messages.h
blobd328d524399f0270b006c5bfb40aba2551aca525
1 // Copyright (c) 2011 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 // Developer tools consist of the following parts:
6 //
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.
9 //
10 // DevToolsClient is a thin delegate that lives in the tools front-end
11 // renderer and converts IPC messages to frontend method calls and allows the
12 // frontend to send messages to the DevToolsAgent.
14 // All the messages are routed through browser process. There is a
15 // DevToolsManager living in the browser process that is responsible for
16 // routing logistics. It is also capable of sending direct messages to the
17 // agent rather than forwarding messages between agents and clients only.
19 // Chain of communication between the components may be described by the
20 // following diagram:
21 // ----------------------------
22 // | (tools frontend |
23 // | renderer process) |
24 // | | --------------------
25 // |tools <--> DevToolsClient+<-- IPC -->+ (browser process) |
26 // |frontend | | |
27 // ---------------------------- ---------+----------
28 // ^
29 // |
30 // IPC
31 // |
32 // v
33 // --------------------------+--------
34 // | inspected page <--> DevToolsAgent |
35 // | |
36 // | (inspected page renderer process) |
37 // -----------------------------------
39 // This file describes developer tools message types.
41 // Multiply-included message file, no standard include guard.
42 #include <map>
43 #include <string>
45 #include "content/common/content_export.h"
46 #include "ipc/ipc_message_macros.h"
48 #undef IPC_MESSAGE_EXPORT
49 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
51 #define IPC_MESSAGE_START DevToolsMsgStart
53 // These are messages sent from DevToolsAgent to DevToolsClient through the
54 // browser.
55 // WebKit-level transport.
56 IPC_MESSAGE_ROUTED1(DevToolsClientMsg_DispatchOnInspectorFrontend,
57 std::string /* message */)
59 //-----------------------------------------------------------------------------
60 // These are messages sent from DevToolsClient to DevToolsAgent through the
61 // browser.
62 // Tells agent that there is a client host connected to it.
63 IPC_MESSAGE_ROUTED0(DevToolsAgentMsg_Attach)
65 // Tells agent that a client host was disconnected from another agent and
66 // connected to this one.
67 IPC_MESSAGE_ROUTED1(DevToolsAgentMsg_Reattach,
68 std::string /* agent_state */)
70 // Tells agent that there is no longer a client host connected to it.
71 IPC_MESSAGE_ROUTED0(DevToolsAgentMsg_Detach)
73 // WebKit-level transport.
74 IPC_MESSAGE_ROUTED1(DevToolsAgentMsg_DispatchOnInspectorBackend,
75 std::string /* message */)
77 // Inspect element with the given coordinates.
78 IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_InspectElement,
79 int /* x */,
80 int /* y */)
82 // Notifies worker devtools agent that it should pause worker context
83 // when it starts and wait until either DevTools client is attached or
84 // explicit resume notification is received.
85 IPC_MESSAGE_ROUTED0(DevToolsAgentMsg_PauseWorkerContextOnStart)
87 // Worker DevTools agent should resume worker execution.
88 IPC_MESSAGE_ROUTED0(DevToolsAgentMsg_ResumeWorkerContext)
90 //-----------------------------------------------------------------------------
91 // These are messages sent from the browser to the renderer.
93 // RenderViewHostDelegate::RenderViewCreated method sends this message to a
94 // new renderer to notify it that it will host developer tools UI and should
95 // set up all neccessary bindings and create DevToolsClient instance that
96 // will handle communication with inspected page DevToolsAgent.
97 IPC_MESSAGE_ROUTED0(DevToolsMsg_SetupDevToolsClient)
100 //-----------------------------------------------------------------------------
101 // These are messages sent from the renderer to the browser.
103 // Activates (brings to the front) corresponding dev tools window.
104 IPC_MESSAGE_ROUTED0(DevToolsHostMsg_ActivateWindow)
106 // Closes dev tools window that is inspecting current render_view_host.
107 IPC_MESSAGE_ROUTED0(DevToolsHostMsg_CloseWindow)
109 // Moves the corresponding dev tools window by the specified offset.
110 IPC_MESSAGE_ROUTED2(DevToolsHostMsg_MoveWindow,
111 int /* x */,
112 int /* y */)
114 // Attaches dev tools window that is inspecting current render_view_host.
115 IPC_MESSAGE_ROUTED0(DevToolsHostMsg_RequestDockWindow)
117 // Detaches dev tools window that is inspecting current render_view_host.
118 IPC_MESSAGE_ROUTED0(DevToolsHostMsg_RequestUndockWindow)
120 // Specifies side for devtools to dock to.
121 IPC_MESSAGE_ROUTED1(DevToolsHostMsg_RequestSetDockSide,
122 std::string /* side */)
124 // Shows Save As dialog for content.
125 IPC_MESSAGE_ROUTED2(DevToolsHostMsg_SaveAs,
126 std::string /* file_name */,
127 std::string /* content */)
129 // Updates agent runtime state stored in devtools manager in order to support
130 // cross-navigation instrumentation.
131 IPC_MESSAGE_ROUTED1(DevToolsHostMsg_SaveAgentRuntimeState,
132 std::string /* state */)
134 // Clears browser cache.
135 IPC_MESSAGE_ROUTED0(DevToolsHostMsg_ClearBrowserCache)
137 // Clears browser cookies.
138 IPC_MESSAGE_ROUTED0(DevToolsHostMsg_ClearBrowserCookies)
141 //-----------------------------------------------------------------------------
142 // These are messages sent from the inspected page renderer to the worker
143 // renderer.