Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / shell / common / shell_messages.h
blobfa7c63eac03778f30f67b651b440138cd960c24f
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.
6 #include <string>
7 #include <vector>
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
42 // notifyDone().
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.
49 IPC_MESSAGE_ROUTED3(
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 */,
64 SkBitmap /* image */)
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,
87 int /* offset */)
88 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_Reload)
89 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_LoadURLForFrame,
90 GURL /* url */,
91 std::string /* frame_name */)
92 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDeviceScaleFactor,
93 float /* factor */)
94 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CaptureSessionHistory)
95 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseRemainingWindows)
97 IPC_MESSAGE_CONTROL3(ShellViewHostMsg_EchoPing,
98 int /* routing_id */,
99 int /* id */,
100 std::string /* body */)
101 IPC_MESSAGE_ROUTED2(ShellViewMsg_EchoPong,
102 int /* id */,
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 */)
113 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetBluetoothManualChooser,
114 bool /* enable */)
115 IPC_SYNC_MESSAGE_ROUTED0_1(ShellViewHostMsg_GetBluetoothManualChooserEvents,
116 std::vector<std::string> /* events */)
117 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_SendBluetoothManualChooserEvent,
118 std::string /* event */,
119 std::string /* argument */)