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"
17 #define IPC_MESSAGE_START ShellMsgStart
19 IPC_STRUCT_TRAITS_BEGIN(content::ShellTestConfiguration
)
20 IPC_STRUCT_TRAITS_MEMBER(current_working_directory
)
21 IPC_STRUCT_TRAITS_MEMBER(temp_path
)
22 IPC_STRUCT_TRAITS_MEMBER(test_url
)
23 IPC_STRUCT_TRAITS_MEMBER(enable_pixel_dumping
)
24 IPC_STRUCT_TRAITS_MEMBER(allow_external_pages
)
25 IPC_STRUCT_TRAITS_MEMBER(expected_pixel_hash
)
26 IPC_STRUCT_TRAITS_MEMBER(initial_size
)
27 IPC_STRUCT_TRAITS_END()
29 // Tells the renderer to reset all test runners.
30 IPC_MESSAGE_ROUTED0(ShellViewMsg_Reset
)
32 // Sets the path to the WebKit checkout.
33 IPC_MESSAGE_CONTROL1(ShellViewMsg_SetWebKitSourceDir
,
34 base::FilePath
/* webkit source dir */)
36 // Sets the initial configuration to use for layout tests.
37 IPC_MESSAGE_ROUTED1(ShellViewMsg_SetTestConfiguration
,
38 content::ShellTestConfiguration
)
40 // Tells the main window that a secondary window in a different process invoked
42 IPC_MESSAGE_ROUTED0(ShellViewMsg_NotifyDone
)
44 // Pushes a snapshot of the current session history from the browser process.
45 // This includes only information about those RenderViews that are in the
46 // same process as the main window of the layout test and that are the current
47 // active RenderView of their WebContents.
49 ShellViewMsg_SessionHistory
,
50 std::vector
<int> /* routing_ids */,
51 std::vector
<std::vector
<content::PageState
> > /* session_histories */,
52 std::vector
<unsigned> /* current_entry_indexes */)
54 IPC_MESSAGE_ROUTED0(ShellViewMsg_TryLeakDetection
)
56 // Send a text dump of the WebContents to the render host.
57 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_TextDump
,
58 std::string
/* dump */)
60 // Send an image dump of the WebContents to the render host.
61 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump
,
62 std::string
/* actual pixel hash */,
65 // Send an audio dump to the render host.
66 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AudioDump
,
67 std::vector
<unsigned char> /* audio data */)
69 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinished
)
71 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ResetDone
)
73 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinishedInSecondaryWindow
)
75 // WebTestDelegate related.
76 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_OverridePreferences
,
77 WebPreferences
/* preferences */)
78 IPC_SYNC_MESSAGE_ROUTED1_1(ShellViewHostMsg_RegisterIsolatedFileSystem
,
79 std::vector
<base::FilePath
> /* absolute_filenames */,
80 std::string
/* filesystem_id */)
81 IPC_SYNC_MESSAGE_ROUTED1_1(ShellViewHostMsg_ReadFileToString
,
82 base::FilePath
/* local path */,
83 std::string
/* contents */)
84 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_PrintMessage
,
85 std::string
/* message */)
86 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ClearDevToolsLocalStorage
)
87 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ShowDevTools
,
88 std::string
/* settings */,
89 std::string
/* frontend_url */)
90 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseDevTools
)
91 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_GoToOffset
,
93 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_Reload
)
94 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_LoadURLForFrame
,
96 std::string
/* frame_name */)
97 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ClearAllDatabases
)
98 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDatabaseQuota
,
100 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AcceptAllCookies
,
102 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_DeleteAllCookies
)
103 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDeviceScaleFactor
,
105 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CaptureSessionHistory
)
106 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseRemainingWindows
)
108 IPC_STRUCT_TRAITS_BEGIN(content::LeakDetectionResult
)
109 IPC_STRUCT_TRAITS_MEMBER(leaked
)
110 IPC_STRUCT_TRAITS_MEMBER(detail
)
111 IPC_STRUCT_TRAITS_END()
113 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_LeakDetectionDone
,
114 content::LeakDetectionResult
/* result */)