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
3 // found in the LICENSE file.
5 // Multiply-included file, no traditional include guard.
9 #include "content/public/common/common_param_traits.h"
10 #include "content/public/common/page_state.h"
11 #include "content/shell/common/leak_detection_result.h"
12 #include "content/shell/common/shell_test_configuration.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_platform_file.h"
15 #include "third_party/skia/include/core/SkBitmap.h"
16 #include "ui/gfx/ipc/gfx_param_traits.h"
18 #define IPC_MESSAGE_START ShellMsgStart
20 IPC_STRUCT_TRAITS_BEGIN(content::ShellTestConfiguration
)
21 IPC_STRUCT_TRAITS_MEMBER(current_working_directory
)
22 IPC_STRUCT_TRAITS_MEMBER(temp_path
)
23 IPC_STRUCT_TRAITS_MEMBER(test_url
)
24 IPC_STRUCT_TRAITS_MEMBER(enable_pixel_dumping
)
25 IPC_STRUCT_TRAITS_MEMBER(allow_external_pages
)
26 IPC_STRUCT_TRAITS_MEMBER(expected_pixel_hash
)
27 IPC_STRUCT_TRAITS_MEMBER(initial_size
)
28 IPC_STRUCT_TRAITS_END()
30 // Tells the renderer to reset all test runners.
31 IPC_MESSAGE_ROUTED0(ShellViewMsg_Reset
)
33 // Sets the path to the WebKit checkout.
34 IPC_MESSAGE_CONTROL1(ShellViewMsg_SetWebKitSourceDir
,
35 base::FilePath
/* webkit source dir */)
37 // Sets the initial configuration to use for layout tests.
38 IPC_MESSAGE_ROUTED1(ShellViewMsg_SetTestConfiguration
,
39 content::ShellTestConfiguration
)
41 // Tells the main window that a secondary window in a different process invoked
43 IPC_MESSAGE_ROUTED0(ShellViewMsg_NotifyDone
)
45 // Pushes a snapshot of the current session history from the browser process.
46 // This includes only information about those RenderViews that are in the
47 // same process as the main window of the layout test and that are the current
48 // active RenderView of their WebContents.
50 ShellViewMsg_SessionHistory
,
51 std::vector
<int> /* routing_ids */,
52 std::vector
<std::vector
<content::PageState
> > /* session_histories */,
53 std::vector
<unsigned> /* current_entry_indexes */)
55 IPC_MESSAGE_ROUTED0(ShellViewMsg_TryLeakDetection
)
57 // Send a text dump of the WebContents to the render host.
58 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_TextDump
,
59 std::string
/* dump */)
61 // Send an image dump of the WebContents to the render host.
62 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump
,
63 std::string
/* actual pixel hash */,
66 // Send an audio dump to the render host.
67 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AudioDump
,
68 std::vector
<unsigned char> /* audio data */)
70 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinished
)
72 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ResetDone
)
74 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinishedInSecondaryWindow
)
76 // WebTestDelegate related.
77 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_OverridePreferences
,
78 content::WebPreferences
/* preferences */)
79 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_PrintMessage
,
80 std::string
/* message */)
81 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ClearDevToolsLocalStorage
)
82 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ShowDevTools
,
83 std::string
/* settings */,
84 std::string
/* frontend_url */)
85 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseDevTools
)
86 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_GoToOffset
,
88 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_Reload
)
89 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_LoadURLForFrame
,
91 std::string
/* frame_name */)
92 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDeviceScaleFactor
,
94 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CaptureSessionHistory
)
95 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseRemainingWindows
)
97 IPC_MESSAGE_CONTROL3(ShellViewHostMsg_EchoPing
,
100 std::string
/* body */)
101 IPC_MESSAGE_ROUTED2(ShellViewMsg_EchoPong
,
103 std::string
/* body */)
105 IPC_STRUCT_TRAITS_BEGIN(content::LeakDetectionResult
)
106 IPC_STRUCT_TRAITS_MEMBER(leaked
)
107 IPC_STRUCT_TRAITS_MEMBER(detail
)
108 IPC_STRUCT_TRAITS_END()
110 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_LeakDetectionDone
,
111 content::LeakDetectionResult
/* result */)