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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/common/devtools_messages.h
diff --git a/content/common/devtools_messages.h b/content/common/devtools_messages.h
index d91498ed9968d35a59e8b2d2060172846c1742eb..11f6ae3a7bec110d5e6caf19e11378f895f5a162 100644
--- a/content/common/devtools_messages.h
+++ b/content/common/devtools_messages.h
@@ -46,12 +46,30 @@
#include "content/public/common/common_param_traits.h"
#include "content/public/common/console_message_level.h"
#include "ipc/ipc_message_macros.h"
+#include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START DevToolsMsgStart
+IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDeviceEmulationParams::ScreenPosition,
+ blink::WebDeviceEmulationParams::ScreenPositionLast)
+
+IPC_STRUCT_TRAITS_BEGIN(blink::WebSize)
+ IPC_STRUCT_TRAITS_MEMBER(width)
+ IPC_STRUCT_TRAITS_MEMBER(height)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(blink::WebDeviceEmulationParams)
+ IPC_STRUCT_TRAITS_MEMBER(screenPosition)
+ IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
+ IPC_STRUCT_TRAITS_MEMBER(viewSize)
+ IPC_STRUCT_TRAITS_MEMBER(fitToView)
+ IPC_STRUCT_TRAITS_MEMBER(offset)
+ IPC_STRUCT_TRAITS_MEMBER(scale)
+IPC_STRUCT_TRAITS_END()
+
// These are messages sent from DevToolsAgent to DevToolsClient through the
// browser.
@@ -114,6 +132,13 @@ IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_AddMessageToConsole,
IPC_MESSAGE_ROUTED0(DevToolsMsg_SetupDevToolsClient)
+// Enables device emulation.
+IPC_MESSAGE_ROUTED1(DevToolsMsg_EnableDeviceEmulation,
+ blink::WebDeviceEmulationParams /* params */)
+
+// Disables device emulation, enabled previously by EnableDeviceEmulation.
+IPC_MESSAGE_ROUTED0(DevToolsMsg_DisableDeviceEmulation)
+
//-----------------------------------------------------------------------------
// These are messages sent from the renderer to the browser.

Powered by Google App Engine
This is Rietveld 408576698