2014-10-31 11:17:05 -07:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 17:49:37 +08:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-04-21 11:01:04 +08:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
// Multiply-included file, no traditional include guard.
|
|
|
|
|
2014-03-16 09:37:04 +08:00
|
|
|
#include "atom/common/draggable_region.h"
|
2013-12-10 14:14:05 +08:00
|
|
|
#include "base/strings/string16.h"
|
2013-04-21 11:01:04 +08:00
|
|
|
#include "base/values.h"
|
|
|
|
#include "content/public/common/common_param_traits.h"
|
2017-11-27 12:30:14 +05:30
|
|
|
#include "content/public/common/referrer.h"
|
2013-04-21 11:01:04 +08:00
|
|
|
#include "ipc/ipc_message_macros.h"
|
2018-09-18 20:00:31 +02:00
|
|
|
#include "ipc/ipc_platform_file.h"
|
2017-05-19 21:35:13 +02:00
|
|
|
#include "ui/gfx/geometry/rect_f.h"
|
2014-10-11 19:11:34 +08:00
|
|
|
#include "ui/gfx/ipc/gfx_param_traits.h"
|
2017-11-27 12:30:14 +05:30
|
|
|
#include "url/gurl.h"
|
2013-04-21 11:01:04 +08:00
|
|
|
|
|
|
|
// The message starter should be declared in ipc/ipc_message_start.h. Since
|
2014-05-07 07:34:53 +01:00
|
|
|
// we don't want to patch Chromium, we just pretend to be Content Shell.
|
2013-04-21 11:01:04 +08:00
|
|
|
|
|
|
|
#define IPC_MESSAGE_START ShellMsgStart
|
|
|
|
|
2013-09-05 19:46:12 +08:00
|
|
|
IPC_STRUCT_TRAITS_BEGIN(atom::DraggableRegion)
|
|
|
|
IPC_STRUCT_TRAITS_MEMBER(draggable)
|
|
|
|
IPC_STRUCT_TRAITS_MEMBER(bounds)
|
|
|
|
IPC_STRUCT_TRAITS_END()
|
|
|
|
|
2018-03-09 15:01:09 +05:30
|
|
|
IPC_MESSAGE_ROUTED2(AtomFrameHostMsg_Message,
|
2018-08-24 17:30:37 +02:00
|
|
|
std::string /* channel */,
|
2014-06-28 19:36:57 +08:00
|
|
|
base::ListValue /* arguments */)
|
2013-04-21 11:01:04 +08:00
|
|
|
|
2018-03-09 15:01:09 +05:30
|
|
|
IPC_SYNC_MESSAGE_ROUTED2_1(AtomFrameHostMsg_Message_Sync,
|
2018-08-24 17:30:37 +02:00
|
|
|
std::string /* channel */,
|
2014-06-28 19:36:57 +08:00
|
|
|
base::ListValue /* arguments */,
|
2018-06-13 04:38:31 -03:00
|
|
|
base::ListValue /* result */)
|
2013-04-23 21:52:19 +08:00
|
|
|
|
2018-08-24 23:14:39 +02:00
|
|
|
IPC_MESSAGE_ROUTED4(AtomFrameHostMsg_Message_To,
|
|
|
|
bool /* send_to_all */,
|
|
|
|
int32_t /* web_contents_id */,
|
2018-08-25 00:30:10 +02:00
|
|
|
std::string /* channel */,
|
2018-08-24 23:14:39 +02:00
|
|
|
base::ListValue /* arguments */)
|
|
|
|
|
2018-09-01 03:13:51 +02:00
|
|
|
IPC_MESSAGE_ROUTED4(AtomFrameMsg_Message,
|
2016-05-27 16:58:49 +09:00
|
|
|
bool /* send_to_all */,
|
2018-08-24 17:30:37 +02:00
|
|
|
std::string /* channel */,
|
2018-09-01 03:13:51 +02:00
|
|
|
base::ListValue /* arguments */,
|
|
|
|
int32_t /* sender_id */)
|
2013-09-05 19:46:12 +08:00
|
|
|
|
2017-04-11 14:19:34 +02:00
|
|
|
IPC_MESSAGE_ROUTED0(AtomViewMsg_Offscreen)
|
|
|
|
|
2017-05-26 03:38:27 +02:00
|
|
|
IPC_MESSAGE_ROUTED3(AtomAutofillFrameHostMsg_ShowPopup,
|
2017-05-19 21:35:13 +02:00
|
|
|
gfx::RectF /* bounds */,
|
|
|
|
std::vector<base::string16> /* values */,
|
|
|
|
std::vector<base::string16> /* labels */)
|
|
|
|
|
2017-05-26 03:38:27 +02:00
|
|
|
IPC_MESSAGE_ROUTED0(AtomAutofillFrameHostMsg_HidePopup)
|
2017-05-19 21:35:13 +02:00
|
|
|
|
2017-05-26 03:38:27 +02:00
|
|
|
IPC_MESSAGE_ROUTED1(AtomAutofillFrameMsg_AcceptSuggestion,
|
2017-05-19 21:35:13 +02:00
|
|
|
base::string16 /* suggestion */)
|
|
|
|
|
2013-09-05 19:46:12 +08:00
|
|
|
// Sent by the renderer when the draggable regions are updated.
|
2018-01-01 22:54:02 +05:30
|
|
|
IPC_MESSAGE_ROUTED1(AtomFrameHostMsg_UpdateDraggableRegions,
|
2013-09-05 19:46:12 +08:00
|
|
|
std::vector<atom::DraggableRegion> /* regions */)
|
2016-05-27 08:51:02 +09:00
|
|
|
|
|
|
|
// Update renderer process preferences.
|
|
|
|
IPC_MESSAGE_CONTROL1(AtomMsg_UpdatePreferences, base::ListValue)
|
2017-01-30 22:36:50 +05:30
|
|
|
|
|
|
|
// Sent by renderer to set the temporary zoom level.
|
2018-03-09 15:01:09 +05:30
|
|
|
IPC_SYNC_MESSAGE_ROUTED1_1(AtomFrameHostMsg_SetTemporaryZoomLevel,
|
2017-01-30 22:36:50 +05:30
|
|
|
double /* zoom level */,
|
|
|
|
double /* result */)
|
|
|
|
|
|
|
|
// Sent by renderer to get the zoom level.
|
2018-03-09 15:01:09 +05:30
|
|
|
IPC_SYNC_MESSAGE_ROUTED0_1(AtomFrameHostMsg_GetZoomLevel, double /* result */)
|
2017-11-27 12:30:14 +05:30
|
|
|
|
|
|
|
// Brings up SaveAs... dialog to save specified URL.
|
|
|
|
IPC_MESSAGE_ROUTED2(AtomFrameHostMsg_PDFSaveURLAs,
|
|
|
|
GURL /* url */,
|
|
|
|
content::Referrer /* referrer */)
|
2018-09-18 20:00:31 +02:00
|
|
|
|
|
|
|
IPC_MESSAGE_ROUTED2(AtomFrameMsg_TakeHeapSnapshot,
|
|
|
|
IPC::PlatformFileForTransit /* file_handle */,
|
|
|
|
std::string /* channel */)
|