OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Messages sent from the ARC instance to the host | 5 // Messages sent from the host to the ARC instance. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <string> |
| 11 |
10 #include "base/file_descriptor_posix.h" | 12 #include "base/file_descriptor_posix.h" |
| 13 #include "chromeos/chromeos_export.h" |
11 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
12 | 15 |
| 16 // Export IPC messages. |
| 17 #undef IPC_MESSAGE_EXPORT |
| 18 #define IPC_MESSAGE_EXPORT CHROMEOS_EXPORT |
| 19 |
13 #define IPC_MESSAGE_START ArcInstanceMsgStart | 20 #define IPC_MESSAGE_START ArcInstanceMsgStart |
14 | 21 |
15 // Registers a virtual input device on the container side. | 22 // Registers a virtual input device on the container side. |
16 // |name| is the device name, like "Chrome OS Keyboard". | 23 // |name| is the device name, like "Chrome OS Keyboard". |
17 // |device_type| is the device type, like "keyboard". | 24 // |device_type| is the device type, like "keyboard". |
18 // The virtual device will be reading 'struct input_event's from |fd|. The | 25 // The virtual device will be reading 'struct input_event's from |fd|. The |
19 // ownership of |fd| will be transferred to the receiver, so the sender must | 26 // ownership of |fd| will be transferred to the receiver, so the sender must |
20 // not close it. | 27 // not close it. |
21 IPC_MESSAGE_CONTROL3(ArcInstanceMsg_RegisterInputDevice, | 28 IPC_MESSAGE_CONTROL3(ArcInstanceMsg_RegisterInputDevice, |
22 std::string, /* name */ | 29 std::string, /* name */ |
23 std::string, /* device_type */ | 30 std::string, /* device_type */ |
24 base::FileDescriptor /* fd */) | 31 base::FileDescriptor /* fd */) |
| 32 |
| 33 // Sends a request to ARC to refresh list of ARC apps. |
| 34 // ArcInstanceMsg_RefreshApps is expected in response to this message. However, |
| 35 // response may not be sent if ARC is not ready yet (boot completed event is |
| 36 // not received). |
| 37 IPC_MESSAGE_CONTROL0(ArcInstanceMsg_RefreshApps) |
| 38 |
| 39 // Sends a request to ARC to launch an ARC app defined by |package| and |
| 40 // |activity|, which cannot be empty. |
| 41 IPC_MESSAGE_CONTROL2(ArcInstanceMsg_LaunchApp, |
| 42 std::string, /* package */ |
| 43 std::string /* activity */) |
| 44 |
| 45 // It sends a request to ARC for the ARC app icon of a required scale factor. |
| 46 // Scale factor is an enum defined at ui/base/layout.h. App is defined by |
| 47 // package and activity, which cannot be empty. |
| 48 IPC_MESSAGE_CONTROL3(ArcInstanceMsg_RequestIcon, |
| 49 std::string, /* package */ |
| 50 std::string, /* activity */ |
| 51 int /* scale factor */) |
OLD | NEW |