Commit eb91af7d authored by Maggie Cai's avatar Maggie Cai Committed by Commit Bot

[IntentHandling] Adds specific data fields in IntentInfo.

This CL adds fields in IntentInfo to allow Chrome to send more flexible
intent to ARC. This allows ARC to create the URI rather than Chrome.

BUG=853604

Change-Id: Ib908039e079109e5d72c31d8c5822b8bcd2b10bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1839751
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Reviewed-by: default avatarDavid Jacobo <djacobo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704502}
parent df911474
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Next MinVersion: 30 // Next MinVersion: 31
module arc.mojom; module arc.mojom;
...@@ -50,6 +50,12 @@ struct AuthorityEntry { ...@@ -50,6 +50,12 @@ struct AuthorityEntry {
int32 port; int32 port;
}; };
struct UriComponents {
string scheme; // Scheme to create URI in ARC.
string authority; // Authority to create URI in ARC.
string path; // Path to create URI in ARC.
};
struct IntentInfo { struct IntentInfo {
string action; string action;
array<string>? categories; array<string>? categories;
...@@ -62,6 +68,10 @@ struct IntentInfo { ...@@ -62,6 +68,10 @@ struct IntentInfo {
// intents to carry additional data. See: // intents to carry additional data. See:
// https://developer.android.com/reference/android/content/Intent#putExtra(java.lang.String,%20java.lang.String) // https://developer.android.com/reference/android/content/Intent#putExtra(java.lang.String,%20java.lang.String)
[MinVersion=22] map<string, string>? extras; [MinVersion=22] map<string, string>? extras;
// Optional URI components to build data URI in ARC. If |IntentInfo.data| is
// set, this field will be ignored.
[MinVersion=30] UriComponents? uri_components;
}; };
struct IntentFilter { struct IntentFilter {
...@@ -174,7 +184,7 @@ interface CustomTabSession { ...@@ -174,7 +184,7 @@ interface CustomTabSession {
// Handles intents from ARC in Chrome. // Handles intents from ARC in Chrome.
// Deprecated method ID: 4 // Deprecated method ID: 4
// Next method ID: 13 // Next method ID: 14
interface IntentHelperHost { interface IntentHelperHost {
// Called when icons associated with the package are no longer up to date. // Called when icons associated with the package are no longer up to date.
[MinVersion=3] OnIconInvalidated@1(string package_name); [MinVersion=3] OnIconInvalidated@1(string package_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment