Index: components/arc/common/intent_helper.mojom |
diff --git a/components/arc/common/intent_helper.mojom b/components/arc/common/intent_helper.mojom |
index 57b1d499a4f75b34f57f543dbd08e20ea41ad569..710c9da2ea9d31718a1fd3fde5a2ad8763423cf0 100644 |
--- a/components/arc/common/intent_helper.mojom |
+++ b/components/arc/common/intent_helper.mojom |
@@ -4,6 +4,13 @@ |
module arc; |
+// Describes a package that can handle a URL. |
+struct UrlHandlerInfo { |
+ string name; |
+ string package_name; |
+ string activity_name; // A hint for retrieving the package's icon. |
+}; |
+ |
// Handles intents from ARC in Chrome. |
interface IntentHelperHost { |
// Opens the url with Chrome for Chrome OS. |
@@ -12,9 +19,17 @@ interface IntentHelperHost { |
// Sends intents to ARC on behalf of Chrome. |
interface IntentHelperInstance { |
+ // Handles the URL by sending an ACTION_VIEW intent to the package. The |
+ // most suitable activity for the URL within the package will be started. |
+ [MinVersion=2] HandleUrl@2(string url, string package_name); |
+ |
// Establishes full-duplex communication with the host. |
Init@0(IntentHelperHost host_ptr); |
+ // Requests a list of packages that can handle the URL. |
+ [MinVersion=2] RequestUrlHandlerList@3(string url) |
+ => (array<UrlHandlerInfo> handlers); |
+ |
// Send an Android broadcast message to the Android package and class |
// specified. Data can be sent as extras by including a JSON map string which |
// will be automatically converted to a bundle accessible by the receiver. |