diff options
-rw-r--r-- | chromeos/BUILD.gn | 1 | ||||
-rw-r--r-- | chromeos/arc/OWNERS | 3 | ||||
-rw-r--r-- | chromeos/arc/bridge/common/OWNERS | 12 | ||||
-rw-r--r-- | chromeos/arc/bridge/common/arc_host_messages.h | 12 | ||||
-rw-r--r-- | chromeos/arc/bridge/common/arc_instance_messages.h | 24 | ||||
-rw-r--r-- | chromeos/arc/bridge/common/arc_message_generator.cc | 33 | ||||
-rw-r--r-- | chromeos/arc/bridge/common/arc_message_generator.h | 9 | ||||
-rw-r--r-- | chromeos/chromeos.gyp | 2 | ||||
-rw-r--r-- | ipc/ipc_message_start.h | 2 |
9 files changed, 98 insertions, 0 deletions
diff --git a/chromeos/BUILD.gn b/chromeos/BUILD.gn index 268a5b2..d66f80e 100644 --- a/chromeos/BUILD.gn +++ b/chromeos/BUILD.gn @@ -33,6 +33,7 @@ component("chromeos") { "//crypto", "//crypto:platform", "//google_apis", + "//ipc", "//third_party/icu", "//third_party/libxml", "//third_party/protobuf:protobuf_lite", diff --git a/chromeos/arc/OWNERS b/chromeos/arc/OWNERS new file mode 100644 index 0000000..e67f9df --- /dev/null +++ b/chromeos/arc/OWNERS @@ -0,0 +1,3 @@ +elijahtaylor@chromium.org +lhchavez@chromium.org +dgreid@chromium.org diff --git a/chromeos/arc/bridge/common/OWNERS b/chromeos/arc/bridge/common/OWNERS new file mode 100644 index 0000000..78ef284 --- /dev/null +++ b/chromeos/arc/bridge/common/OWNERS @@ -0,0 +1,12 @@ + # Changes to IPC messages require a security review to avoid introducing + # new sandbox escapes. + per-file *_messages*.h=set noparent + per-file *_messages*.h=dcheng@chromium.org + per-file *_messages*.h=inferno@chromium.org + per-file *_messages*.h=jln@chromium.org + per-file *_messages*.h=jschuh@chromium.org + per-file *_messages*.h=kenrb@chromium.org + per-file *_messages*.h=mkwst@chromium.org + per-file *_messages*.h=nasko@chromium.org + per-file *_messages*.h=tsepez@chromium.org + per-file *_messages*.h=wfh@chromium.org diff --git a/chromeos/arc/bridge/common/arc_host_messages.h b/chromeos/arc/bridge/common/arc_host_messages.h new file mode 100644 index 0000000..a04efd2 --- /dev/null +++ b/chromeos/arc/bridge/common/arc_host_messages.h @@ -0,0 +1,12 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Messages sent from the host to the ARC instance +// Multiply-included message file, hence no include guard. + +#include "ipc/ipc_message_macros.h" + +#define IPC_MESSAGE_START ArcInstanceHostMsgStart + +IPC_MESSAGE_CONTROL0(ArcInstanceHostMsg_InstanceReady) diff --git a/chromeos/arc/bridge/common/arc_instance_messages.h b/chromeos/arc/bridge/common/arc_instance_messages.h new file mode 100644 index 0000000..607718d --- /dev/null +++ b/chromeos/arc/bridge/common/arc_instance_messages.h @@ -0,0 +1,24 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Messages sent from the ARC instance to the host +// Multiply-included message file, hence no include guard. + +#include <stdint.h> + +#include "base/file_descriptor_posix.h" +#include "ipc/ipc_message_macros.h" + +#define IPC_MESSAGE_START ArcInstanceMsgStart + +// Registers a virtual input device on the container side. +// |name| is the device name, like "Chrome OS Keyboard". +// |device_type| is the device type, like "keyboard". +// The virtual device will be reading 'struct input_event's from |fd|. The +// ownership of |fd| will be transferred to the receiver, so the sender must +// not close it. +IPC_MESSAGE_CONTROL3(ArcInstanceMsg_RegisterInputDevice, + std::string, /* name */ + std::string, /* device_type */ + base::FileDescriptor /* fd */) diff --git a/chromeos/arc/bridge/common/arc_message_generator.cc b/chromeos/arc/bridge/common/arc_message_generator.cc new file mode 100644 index 0000000..910d433 --- /dev/null +++ b/chromeos/arc/bridge/common/arc_message_generator.cc @@ -0,0 +1,33 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Get basic type definitions. +#define IPC_MESSAGE_IMPL +#include "arc_message_generator.h" + +// Generate constructors. +#include "ipc/struct_constructor_macros.h" +#include "arc_message_generator.h" + +// Generate destructors. +#include "ipc/struct_destructor_macros.h" +#include "arc_message_generator.h" + +// Generate param traits write methods. +#include "ipc/param_traits_write_macros.h" +namespace IPC { +#include "arc_message_generator.h" +} // namespace IPC + +// Generate param traits read methods. +#include "ipc/param_traits_read_macros.h" +namespace IPC { +#include "arc_message_generator.h" +} // namespace IPC + +// Generate param traits log methods. +#include "ipc/param_traits_log_macros.h" +namespace IPC { +#include "arc_message_generator.h" +} // namespace IPC diff --git a/chromeos/arc/bridge/common/arc_message_generator.h b/chromeos/arc/bridge/common/arc_message_generator.h new file mode 100644 index 0000000..2b302a6 --- /dev/null +++ b/chromeos/arc/bridge/common/arc_message_generator.h @@ -0,0 +1,9 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Multiply-included message file, hence no include guard. + +// Not using the full path since this is also expected to be compiled in ARC. +#include "arc_host_messages.h" +#include "arc_instance_messages.h" diff --git a/chromeos/chromeos.gyp b/chromeos/chromeos.gyp index d2f0511..2f93d9e 100644 --- a/chromeos/chromeos.gyp +++ b/chromeos/chromeos.gyp @@ -13,6 +13,7 @@ 'accelerometer/accelerometer_types.h', 'app_mode/kiosk_oem_manifest_parser.cc', 'app_mode/kiosk_oem_manifest_parser.h', + 'arc/bridge/common/arc_message_generator.cc', 'attestation/attestation_constants.cc', 'attestation/attestation_constants.h', 'attestation/attestation_flow.cc', @@ -478,6 +479,7 @@ '../crypto/crypto.gyp:crypto', '../dbus/dbus.gyp:dbus', '../google_apis/google_apis.gyp:google_apis', + '../ipc/ipc.gyp:ipc', '../net/net.gyp:net', '../third_party/icu/icu.gyp:icui18n', '../third_party/libxml/libxml.gyp:libxml', diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h index 9edcfa5..8acdd7c 100644 --- a/ipc/ipc_message_start.h +++ b/ipc/ipc_message_start.h @@ -129,6 +129,8 @@ enum IPCMessageStart { PageLoadMetricsMsgStart, MemoryMsgStart, IPCTestMsgStart, + ArcInstanceMsgStart, + ArcInstanceHostMsgStart, LastIPCMsgStart // Must come last. }; |