Commit bc753b0a authored by Li Lin's avatar Li Lin Committed by Commit Bot

Add Open URL to Assistant mojo interface.

Bug: 807015
Change-Id: I2fb742bfd6d4745362edec1d43afbfb928787a9e
Reviewed-on: https://chromium-review.googlesource.com/954362
Commit-Queue: Li Lin <llin@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543868}
parent c002f468
...@@ -72,7 +72,7 @@ void AssistantManagerServiceImpl::OnShowText(const std::string& text) { ...@@ -72,7 +72,7 @@ void AssistantManagerServiceImpl::OnShowText(const std::string& text) {
} }
void AssistantManagerServiceImpl::OnOpenUrl(const std::string& url) { void AssistantManagerServiceImpl::OnOpenUrl(const std::string& url) {
subscribers_.ForAllPtrs([&url](auto* ptr) { ptr->OnTextResponse(url); }); subscribers_.ForAllPtrs([&url](auto* ptr) { ptr->OnOpenUrlResponse(url); });
} }
} // namespace assistant } // namespace assistant
......
...@@ -13,5 +13,6 @@ mojom("mojom") { ...@@ -13,5 +13,6 @@ mojom("mojom") {
public_deps = [ public_deps = [
"//mojo/common:common_custom_types", "//mojo/common:common_custom_types",
"//services/identity/public/mojom", "//services/identity/public/mojom",
"//url/mojom:url_mojom_gurl",
] ]
} }
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
module chromeos.assistant.mojom; module chromeos.assistant.mojom;
import "url/mojom/url.mojom";
// Interface to communicate with assistant backend. // Interface to communicate with assistant backend.
interface Assistant { interface Assistant {
// Send text query to assistant. Result will be returned through registered // Send text query to assistant. Result will be returned through registered
...@@ -22,4 +24,7 @@ interface AssistantEventSubscriber { ...@@ -22,4 +24,7 @@ interface AssistantEventSubscriber {
// Assistant's got text response from server. // Assistant's got text response from server.
OnTextResponse(string response); OnTextResponse(string response);
// Assistant's got open URL response from server.
OnOpenUrlResponse(url.mojom.Url url);
}; };
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