| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // Next MinVersion: 15 | 5 // Next MinVersion: 16 |
| 6 | 6 |
| 7 module arc.mojom; | 7 module arc.mojom; |
| 8 | 8 |
| 9 import "scale_factor.mojom"; | 9 import "scale_factor.mojom"; |
| 10 | 10 |
| 11 // Describes the type of action to invoke. | 11 // Describes the type of action to invoke. |
| 12 enum ActionType { | 12 enum ActionType { |
| 13 VIEW, | 13 VIEW, |
| 14 SEND, | 14 SEND, |
| 15 SEND_MULTIPLE, | 15 SEND_MULTIPLE, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 // Opens the wallpaper picker dialog. | 102 // Opens the wallpaper picker dialog. |
| 103 [MinVersion=6] OpenWallpaperPicker@3(); | 103 [MinVersion=6] OpenWallpaperPicker@3(); |
| 104 | 104 |
| 105 // Sets an image as the wallpaper. | 105 // Sets an image as the wallpaper. |
| 106 // |jpeg_data| is a JPEG encoded wallpaper image. | 106 // |jpeg_data| is a JPEG encoded wallpaper image. |
| 107 [MinVersion=8] SetWallpaperDeprecated@4(array<uint8> jpeg_data); | 107 [MinVersion=8] SetWallpaperDeprecated@4(array<uint8> jpeg_data); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 // Sends intents to ARC on behalf of Chrome. | 110 // Sends intents to ARC on behalf of Chrome. |
| 111 // Next method ID: 11 | 111 // Next method ID: 13 |
| 112 interface IntentHelperInstance { | 112 interface IntentHelperInstance { |
| 113 // Sets the given package as a preferred package. The next time an ACTION_VIEW | 113 // Sets the given package as a preferred package. The next time an ACTION_VIEW |
| 114 // intent is sent with a URL that requires disambiguation, instead of opening | 114 // intent is sent with a URL that requires disambiguation, instead of opening |
| 115 // the ResolverActivity, this package will be picked if it is on the list. | 115 // the ResolverActivity, this package will be picked if it is on the list. |
| 116 // When multiple packages are set as preferred, the most recent setting wins. | 116 // When multiple packages are set as preferred, the most recent setting wins. |
| 117 [MinVersion=7] AddPreferredPackage@8(string package_name); | 117 [MinVersion=7] AddPreferredPackage@8(string package_name); |
| 118 | 118 |
| 119 // Asks the ContentResolver for the size of the file specified by the URL. |
| 120 [MinVersion=15] GetFileSize@11(string url) => (int64 size); |
| 121 |
| 119 // Passes an intent to an activity. | 122 // Passes an intent to an activity. |
| 120 [MinVersion=12] HandleIntent@10(IntentInfo intent, ActivityName activity); | 123 [MinVersion=12] HandleIntent@10(IntentInfo intent, ActivityName activity); |
| 121 | 124 |
| 122 // Handles the URL by sending an ACTION_VIEW intent to the package. The | 125 // Handles the URL by sending an ACTION_VIEW intent to the package. The |
| 123 // most suitable activity for the URL within the package will be started. | 126 // most suitable activity for the URL within the package will be started. |
| 124 [MinVersion=2] HandleUrl@2(string url, string package_name); | 127 [MinVersion=2] HandleUrl@2(string url, string package_name); |
| 125 | 128 |
| 126 // Handles the list of URLs by sending a specified intent to the handler. | 129 // Handles the list of URLs by sending a specified intent to the handler. |
| 127 [MinVersion=5] HandleUrlList@7(array<UrlWithMimeType> urls, | 130 [MinVersion=5] HandleUrlList@7(array<UrlWithMimeType> urls, |
| 128 ActivityName activity, | 131 ActivityName activity, |
| 129 ActionType action_type); | 132 ActionType action_type); |
| 130 | 133 |
| 131 // Establishes full-duplex communication with the host. | 134 // Establishes full-duplex communication with the host. |
| 132 Init@0(IntentHelperHost host_ptr); | 135 Init@0(IntentHelperHost host_ptr); |
| 133 | 136 |
| 137 // Asks the ContentResolver to get an FD to read the file specified by the |
| 138 // URL. |
| 139 [MinVersion=15] OpenFileToRead@12(string url) => (handle fd); |
| 140 |
| 134 // Requests 48dp * 48dp icons of the |activities| suitable for the | 141 // Requests 48dp * 48dp icons of the |activities| suitable for the |
| 135 // |scale_factor|. An array of icon data will be returned. | 142 // |scale_factor|. An array of icon data will be returned. |
| 136 [MinVersion=3] RequestActivityIcons@4(array<ActivityName> activities, | 143 [MinVersion=3] RequestActivityIcons@4(array<ActivityName> activities, |
| 137 ScaleFactor scale_factor) | 144 ScaleFactor scale_factor) |
| 138 => (array<ActivityIcon> icons); | 145 => (array<ActivityIcon> icons); |
| 139 | 146 |
| 140 // Requests a list of packages that can handle |intent|. | 147 // Requests a list of packages that can handle |intent|. |
| 141 [MinVersion=12] RequestIntentHandlerList@9(IntentInfo intent) | 148 [MinVersion=12] RequestIntentHandlerList@9(IntentInfo intent) |
| 142 => (array<IntentHandlerInfo> handlers); | 149 => (array<IntentHandlerInfo> handlers); |
| 143 | 150 |
| 144 // Requests a list of packages that can handle the URL. | 151 // Requests a list of packages that can handle the URL. |
| 145 [MinVersion=2] RequestUrlHandlerList@3(string url) | 152 [MinVersion=2] RequestUrlHandlerList@3(string url) |
| 146 => (array<IntentHandlerInfo> handlers); | 153 => (array<IntentHandlerInfo> handlers); |
| 147 | 154 |
| 148 // Requests a list of packages that can handle the list of files. | 155 // Requests a list of packages that can handle the list of files. |
| 149 [MinVersion=4] RequestUrlListHandlerList@6(array<UrlWithMimeType> urls) | 156 [MinVersion=4] RequestUrlListHandlerList@6(array<UrlWithMimeType> urls) |
| 150 => (array<IntentHandlerInfo> handlers); | 157 => (array<IntentHandlerInfo> handlers); |
| 151 | 158 |
| 152 // Send an Android broadcast message to the Android package and class | 159 // Send an Android broadcast message to the Android package and class |
| 153 // specified. Data can be sent as extras by including a JSON map string which | 160 // specified. Data can be sent as extras by including a JSON map string which |
| 154 // will be automatically converted to a bundle accessible by the receiver. | 161 // will be automatically converted to a bundle accessible by the receiver. |
| 155 // | 162 // |
| 156 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be | 163 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be |
| 157 // added to the whitelist in ArcBridgeService.java in the Android source. | 164 // added to the whitelist in ArcBridgeService.java in the Android source. |
| 158 [MinVersion=1] SendBroadcast@1(string action, | 165 [MinVersion=1] SendBroadcast@1(string action, |
| 159 string package_name, | 166 string package_name, |
| 160 string cls, | 167 string cls, |
| 161 string extras); | 168 string extras); |
| 162 }; | 169 }; |
| OLD | NEW |