| 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: 8 | 5 // Next MinVersion: 9 |
| 6 module arc.mojom; | 6 module arc.mojom; |
| 7 | 7 |
| 8 import "scale_factor.mojom"; | 8 import "scale_factor.mojom"; |
| 9 | 9 |
| 10 // Describes the type of action to invoke. | 10 // Describes the type of action to invoke. |
| 11 [Extensible] |
| 11 enum ActionType { | 12 enum ActionType { |
| 12 VIEW, | 13 VIEW, |
| 13 SEND, | 14 SEND, |
| 14 SEND_MULTIPLE, | 15 SEND_MULTIPLE, |
| 15 }; | 16 }; |
| 16 | 17 |
| 18 [Extensible] |
| 19 enum PatternType { |
| 20 PATTERN_LITERAL, |
| 21 PATTERN_PREFIX, |
| 22 PATTERN_SIMPLE_GLOB, |
| 23 }; |
| 24 |
| 25 struct PatternMatcher { |
| 26 string pattern; |
| 27 PatternType type; |
| 28 }; |
| 29 |
| 30 struct AuthorityEntry { |
| 31 string host; |
| 32 int32 port; |
| 33 }; |
| 34 |
| 35 struct IntentFilter { |
| 36 array<string> actions; |
| 37 array<string> categories; |
| 38 array<string> data_schemes; |
| 39 array<AuthorityEntry> data_authorities; |
| 40 array<PatternMatcher> data_paths; |
| 41 array<PatternMatcher> data_scheme_specific_parts; |
| 42 }; |
| 43 |
| 17 // Describes a package that can handle a URL. | 44 // Describes a package that can handle a URL. |
| 18 struct UrlHandlerInfo { | 45 struct UrlHandlerInfo { |
| 19 string name; | 46 string name; |
| 20 string package_name; | 47 string package_name; |
| 21 string activity_name; // A hint for retrieving the package's icon. | 48 string activity_name; // A hint for retrieving the package's icon. |
| 22 [MinVersion=4] ActionType action; | 49 [MinVersion=4] ActionType action; |
| 23 [MinVersion=6] bool is_preferred; | 50 [MinVersion=6] bool is_preferred; |
| 24 }; | 51 }; |
| 25 | 52 |
| 26 // Describes an activity. | 53 // Describes an activity. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 37 array<uint8> icon; // in BGRA8888 format | 64 array<uint8> icon; // in BGRA8888 format |
| 38 }; | 65 }; |
| 39 | 66 |
| 40 // URL associated with its mime type. | 67 // URL associated with its mime type. |
| 41 struct UrlWithMimeType { | 68 struct UrlWithMimeType { |
| 42 string url; | 69 string url; |
| 43 string mime_type; | 70 string mime_type; |
| 44 }; | 71 }; |
| 45 | 72 |
| 46 // Handles intents from ARC in Chrome. | 73 // Handles intents from ARC in Chrome. |
| 47 // Next method ID: 4 | 74 // Next method ID: 5 |
| 48 interface IntentHelperHost { | 75 interface IntentHelperHost { |
| 49 // Called when icons associated with the package are no longer up to date. | 76 // Called when icons associated with the package are no longer up to date. |
| 50 [MinVersion=3] OnIconInvalidated@1(string package_name); | 77 [MinVersion=3] OnIconInvalidated@1(string package_name); |
| 51 | 78 |
| 79 // Called when intent filters are updated. Either on startup or when |
| 80 // apps are installed or uninstalled. |
| 81 [MinVersion=8] OnIntentFiltersUpdated@4(array<IntentFilter> intent_filters); |
| 82 |
| 52 // Opens the downloads directory in the Chrome OS file manager. | 83 // Opens the downloads directory in the Chrome OS file manager. |
| 53 [MinVersion=5] OnOpenDownloads@2(); | 84 [MinVersion=5] OnOpenDownloads@2(); |
| 54 | 85 |
| 55 // Opens the url with Chrome for Chrome OS. | 86 // Opens the url with Chrome for Chrome OS. |
| 56 OnOpenUrl@0(string url); | 87 OnOpenUrl@0(string url); |
| 57 | 88 |
| 58 // Opens the wallpaper picker dialog. | 89 // Opens the wallpaper picker dialog. |
| 59 [MinVersion=6] OpenWallpaperPicker@3(); | 90 [MinVersion=6] OpenWallpaperPicker@3(); |
| 60 }; | 91 }; |
| 61 | 92 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // specified. Data can be sent as extras by including a JSON map string which | 135 // specified. Data can be sent as extras by including a JSON map string which |
| 105 // will be automatically converted to a bundle accessible by the receiver. | 136 // will be automatically converted to a bundle accessible by the receiver. |
| 106 // | 137 // |
| 107 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be | 138 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be |
| 108 // added to the whitelist in ArcBridgeService.java in the Android source. | 139 // added to the whitelist in ArcBridgeService.java in the Android source. |
| 109 [MinVersion=1] SendBroadcast@1(string action, | 140 [MinVersion=1] SendBroadcast@1(string action, |
| 110 string package_name, | 141 string package_name, |
| 111 string cls, | 142 string cls, |
| 112 string extras); | 143 string extras); |
| 113 }; | 144 }; |
| OLD | NEW |