Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Side by Side Diff: content/common/devtools_messages.h

Issue 1003113003: [DevTools] Handle emulation in embedder, call into web API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
39 // This file describes developer tools message types. 39 // This file describes developer tools message types.
40 40
41 // Multiply-included message file, no standard include guard. 41 // Multiply-included message file, no standard include guard.
42 #include <map> 42 #include <map>
43 #include <string> 43 #include <string>
44 44
45 #include "content/common/content_export.h" 45 #include "content/common/content_export.h"
46 #include "content/public/common/common_param_traits.h" 46 #include "content/public/common/common_param_traits.h"
47 #include "content/public/common/console_message_level.h" 47 #include "content/public/common/console_message_level.h"
48 #include "ipc/ipc_message_macros.h" 48 #include "ipc/ipc_message_macros.h"
49 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
49 50
50 #undef IPC_MESSAGE_EXPORT 51 #undef IPC_MESSAGE_EXPORT
51 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 52 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
52 53
53 #define IPC_MESSAGE_START DevToolsMsgStart 54 #define IPC_MESSAGE_START DevToolsMsgStart
54 55
56 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDeviceEmulationParams::ScreenPosition,
57 blink::WebDeviceEmulationParams::ScreenPositionLast)
58
59 IPC_STRUCT_TRAITS_BEGIN(blink::WebSize)
60 IPC_STRUCT_TRAITS_MEMBER(width)
61 IPC_STRUCT_TRAITS_MEMBER(height)
62 IPC_STRUCT_TRAITS_END()
63
64 IPC_STRUCT_TRAITS_BEGIN(blink::WebDeviceEmulationParams)
65 IPC_STRUCT_TRAITS_MEMBER(screenPosition)
66 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
67 IPC_STRUCT_TRAITS_MEMBER(viewSize)
68 IPC_STRUCT_TRAITS_MEMBER(fitToView)
69 IPC_STRUCT_TRAITS_MEMBER(offset)
70 IPC_STRUCT_TRAITS_MEMBER(scale)
71 IPC_STRUCT_TRAITS_END()
72
55 // These are messages sent from DevToolsAgent to DevToolsClient through the 73 // These are messages sent from DevToolsAgent to DevToolsClient through the
56 // browser. 74 // browser.
57 75
58 // Agent -> Client message chunk. 76 // Agent -> Client message chunk.
59 // |is_first| marks the first chunk, comes with the |message_size| for 77 // |is_first| marks the first chunk, comes with the |message_size| for
60 // total message size. 78 // total message size.
61 // |is_last| marks the last chunk. |call_id| and |post_state| are optional 79 // |is_last| marks the last chunk. |call_id| and |post_state| are optional
62 // parameters passed with the last chunk of the protocol response. 80 // parameters passed with the last chunk of the protocol response.
63 IPC_STRUCT_BEGIN(DevToolsMessageChunk) 81 IPC_STRUCT_BEGIN(DevToolsMessageChunk)
64 IPC_STRUCT_MEMBER(bool, is_first) 82 IPC_STRUCT_MEMBER(bool, is_first)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 //----------------------------------------------------------------------------- 125 //-----------------------------------------------------------------------------
108 // These are messages sent from the browser to the renderer. 126 // These are messages sent from the browser to the renderer.
109 127
110 // RenderViewHostDelegate::RenderViewCreated method sends this message to a 128 // RenderViewHostDelegate::RenderViewCreated method sends this message to a
111 // new renderer to notify it that it will host developer tools UI and should 129 // new renderer to notify it that it will host developer tools UI and should
112 // set up all neccessary bindings and create DevToolsClient instance that 130 // set up all neccessary bindings and create DevToolsClient instance that
113 // will handle communication with inspected page DevToolsAgent. 131 // will handle communication with inspected page DevToolsAgent.
114 IPC_MESSAGE_ROUTED0(DevToolsMsg_SetupDevToolsClient) 132 IPC_MESSAGE_ROUTED0(DevToolsMsg_SetupDevToolsClient)
115 133
116 134
135 // Enables device emulation.
136 IPC_MESSAGE_ROUTED1(DevToolsMsg_EnableDeviceEmulation,
137 blink::WebDeviceEmulationParams /* params */)
138
139 // Disables device emulation, enabled previously by EnableDeviceEmulation.
140 IPC_MESSAGE_ROUTED0(DevToolsMsg_DisableDeviceEmulation)
141
117 //----------------------------------------------------------------------------- 142 //-----------------------------------------------------------------------------
118 // These are messages sent from the renderer to the browser. 143 // These are messages sent from the renderer to the browser.
119 144
120 // Transport from Inspector frontend to frontend host. 145 // Transport from Inspector frontend to frontend host.
121 IPC_MESSAGE_ROUTED1(DevToolsHostMsg_DispatchOnEmbedder, 146 IPC_MESSAGE_ROUTED1(DevToolsHostMsg_DispatchOnEmbedder,
122 std::string /* message */) 147 std::string /* message */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698