| 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: 9 | 5 // Next MinVersion: 10 |
| 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, |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 struct IntentFilter { |
| 19 array<string> actions; |
| 20 array<string> categories; |
| 21 array<string> data_schemes; |
| 22 }; |
| 23 |
| 18 // Describes a package that can handle a URL. | 24 // Describes a package that can handle a URL. |
| 19 struct UrlHandlerInfo { | 25 struct UrlHandlerInfo { |
| 20 string name; | 26 string name; |
| 21 string package_name; | 27 string package_name; |
| 22 string activity_name; // A hint for retrieving the package's icon. | 28 string activity_name; // A hint for retrieving the package's icon. |
| 23 [MinVersion=4] ActionType action; | 29 [MinVersion=4] ActionType action; |
| 24 [MinVersion=6] bool is_preferred; | 30 [MinVersion=6] bool is_preferred; |
| 25 }; | 31 }; |
| 26 | 32 |
| 27 // Describes an activity. | 33 // Describes an activity. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 array<uint8> icon; // in BGRA8888 format | 44 array<uint8> icon; // in BGRA8888 format |
| 39 }; | 45 }; |
| 40 | 46 |
| 41 // URL associated with its mime type. | 47 // URL associated with its mime type. |
| 42 struct UrlWithMimeType { | 48 struct UrlWithMimeType { |
| 43 string url; | 49 string url; |
| 44 string mime_type; | 50 string mime_type; |
| 45 }; | 51 }; |
| 46 | 52 |
| 47 // Handles intents from ARC in Chrome. | 53 // Handles intents from ARC in Chrome. |
| 48 // Next method ID: 5 | 54 // Next method ID: 6 |
| 49 interface IntentHelperHost { | 55 interface IntentHelperHost { |
| 50 // Called when icons associated with the package are no longer up to date. | 56 // Called when icons associated with the package are no longer up to date. |
| 51 [MinVersion=3] OnIconInvalidated@1(string package_name); | 57 [MinVersion=3] OnIconInvalidated@1(string package_name); |
| 52 | 58 |
| 59 // Called when intent filters are updated. Either on startup or when |
| 60 // apps are installed or uninstalled. |
| 61 [MinVersion=9] OnIntentFiltersUpdated@5(array<IntentFilter> intent_filters); |
| 62 |
| 53 // Opens the downloads directory in the Chrome OS file manager. | 63 // Opens the downloads directory in the Chrome OS file manager. |
| 54 [MinVersion=5] OnOpenDownloads@2(); | 64 [MinVersion=5] OnOpenDownloads@2(); |
| 55 | 65 |
| 56 // Opens the url with Chrome for Chrome OS. | 66 // Opens the url with Chrome for Chrome OS. |
| 57 OnOpenUrl@0(string url); | 67 OnOpenUrl@0(string url); |
| 58 | 68 |
| 59 // Opens the wallpaper picker dialog. | 69 // Opens the wallpaper picker dialog. |
| 60 [MinVersion=6] OpenWallpaperPicker@3(); | 70 [MinVersion=6] OpenWallpaperPicker@3(); |
| 61 | 71 |
| 62 // Sets an image as the wallpaper. | 72 // Sets an image as the wallpaper. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // specified. Data can be sent as extras by including a JSON map string which | 119 // specified. Data can be sent as extras by including a JSON map string which |
| 110 // will be automatically converted to a bundle accessible by the receiver. | 120 // will be automatically converted to a bundle accessible by the receiver. |
| 111 // | 121 // |
| 112 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be | 122 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be |
| 113 // added to the whitelist in ArcBridgeService.java in the Android source. | 123 // added to the whitelist in ArcBridgeService.java in the Android source. |
| 114 [MinVersion=1] SendBroadcast@1(string action, | 124 [MinVersion=1] SendBroadcast@1(string action, |
| 115 string package_name, | 125 string package_name, |
| 116 string cls, | 126 string cls, |
| 117 string extras); | 127 string extras); |
| 118 }; | 128 }; |
| OLD | NEW |