Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / shell / common / shell_messages.h
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.
4
5 // Multiply-included file, no traditional include guard.
6 #include <string>
7 #include <vector>
8
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
17 #define IPC_MESSAGE_START ShellMsgStart
18
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()
28
29 // Tells the renderer to reset all test runners.
30 IPC_MESSAGE_ROUTED0(ShellViewMsg_Reset)
31
32 // Sets the path to the WebKit checkout.
33 IPC_MESSAGE_CONTROL1(ShellViewMsg_SetWebKitSourceDir,
34                      base::FilePath /* webkit source dir */)
35
36 // Sets the initial configuration to use for layout tests.
37 IPC_MESSAGE_ROUTED1(ShellViewMsg_SetTestConfiguration,
38                     content::ShellTestConfiguration)
39
40 // Tells the main window that a secondary window in a different process invoked
41 // notifyDone().
42 IPC_MESSAGE_ROUTED0(ShellViewMsg_NotifyDone)
43
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.
48 IPC_MESSAGE_ROUTED3(
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 */)
53
54 IPC_MESSAGE_ROUTED0(ShellViewMsg_TryLeakDetection)
55
56 // Send a text dump of the WebContents to the render host.
57 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_TextDump,
58                     std::string /* dump */)
59
60 // Send an image dump of the WebContents to the render host.
61 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump,
62                     std::string /* actual pixel hash */,
63                     SkBitmap /* image */)
64
65 // Send an audio dump to the render host.
66 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AudioDump,
67                     std::vector<unsigned char> /* audio data */)
68
69 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinished)
70
71 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ResetDone)
72
73 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinishedInSecondaryWindow)
74
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_ROUTED1(ShellViewHostMsg_ShowDevTools,
88                     std::string /* settings */)
89 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseDevTools)
90 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_GoToOffset,
91                     int /* offset */)
92 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_Reload)
93 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_LoadURLForFrame,
94                     GURL /* url */,
95                     std::string /* frame_name */)
96 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ClearAllDatabases)
97 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDatabaseQuota,
98                     int /* quota */)
99 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AcceptAllCookies,
100                     bool /* accept */)
101 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_DeleteAllCookies)
102 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDeviceScaleFactor,
103                     float /* factor */)
104 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CaptureSessionHistory)
105 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseRemainingWindows)
106
107 IPC_STRUCT_TRAITS_BEGIN(content::LeakDetectionResult)
108 IPC_STRUCT_TRAITS_MEMBER(leaked)
109 IPC_STRUCT_TRAITS_MEMBER(detail)
110 IPC_STRUCT_TRAITS_END()
111
112 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_LeakDetectionDone,
113                     content::LeakDetectionResult /* result */)