15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Multiply-included file, no traditional include guard. 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <string> 72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include <vector> 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "content/public/common/common_param_traits.h" 1090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "content/public/common/page_state.h" 11b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)#include "content/shell/common/shell_test_configuration.h" 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ipc/ipc_message_macros.h" 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "ipc/ipc_platform_file.h" 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "third_party/skia/include/core/SkBitmap.h" 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define IPC_MESSAGE_START ShellMsgStart 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_BEGIN(content::ShellTestConfiguration) 192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_MEMBER(current_working_directory) 202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_MEMBER(temp_path) 212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_MEMBER(test_url) 222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_MEMBER(enable_pixel_dumping) 232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_MEMBER(allow_external_pages) 242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_MEMBER(expected_pixel_hash) 25b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)IPC_STRUCT_TRAITS_MEMBER(initial_size) 262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_STRUCT_TRAITS_END() 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Tells the renderer to reset all test runners. 292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewMsg_Reset) 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Sets the path to the WebKit checkout. 322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_CONTROL1(ShellViewMsg_SetWebKitSourceDir, 332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) base::FilePath /* webkit source dir */) 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Sets the initial configuration to use for layout tests. 362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewMsg_SetTestConfiguration, 372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) content::ShellTestConfiguration) 382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 39c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// Tells the main window that a secondary window in a different process invoked 40c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// notifyDone(). 41c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewMsg_NotifyDone) 42c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Pushes a snapshot of the current session history from the browser process. 442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// This includes only information about those RenderViews that are in the 452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// same process as the main window of the layout test and that are the current 462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// active RenderView of their WebContents. 472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED3( 482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) ShellViewMsg_SessionHistory, 492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::vector<int> /* routing_ids */, 5090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) std::vector<std::vector<content::PageState> > /* session_histories */, 512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::vector<unsigned> /* current_entry_indexes */) 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Send a text dump of the WebContents to the render host. 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_TextDump, 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) std::string /* dump */) 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Send an image dump of the WebContents to the render host. 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump, 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) std::string /* actual pixel hash */, 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) SkBitmap /* image */) 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Send an audio dump to the render host. 632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AudioDump, 642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::vector<unsigned char> /* audio data */) 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 66868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinished) 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ResetDone) 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 70c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinishedInSecondaryWindow) 71c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// WebTestDelegate related. 732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_OverridePreferences, 74c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) WebPreferences /* preferences */) 752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_SYNC_MESSAGE_ROUTED1_1(ShellViewHostMsg_RegisterIsolatedFileSystem, 762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::vector<base::FilePath> /* absolute_filenames */, 772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::string /* filesystem_id */) 782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_SYNC_MESSAGE_ROUTED1_1(ShellViewHostMsg_ReadFileToString, 792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) base::FilePath /* local path */, 802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::string /* contents */) 812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_PrintMessage, 822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::string /* message */) 832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ShowDevTools) 842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseDevTools) 852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_GoToOffset, 862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int /* offset */) 872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_Reload) 882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED2(ShellViewHostMsg_LoadURLForFrame, 892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) GURL /* url */, 902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) std::string /* frame_name */) 912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ClearAllDatabases) 922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDatabaseQuota, 932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int /* quota */) 942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AcceptAllCookies, 952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) bool /* accept */) 967dbb3d5cf0c15f500944d211057644d6a2f37371Ben MurdochIPC_MESSAGE_ROUTED0(ShellViewHostMsg_DeleteAllCookies) 972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetDeviceScaleFactor, 982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) float /* factor */) 992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CaptureSessionHistory) 1002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseRemainingWindows) 101