| Index: chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_arc_home_service.cc
|
| diff --git a/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_arc_home_service.cc b/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_arc_home_service.cc
|
| index e62920061ce26e17c8b3d7a5798b1c19eea2ff60..0ab5ad13c7d037455937572375c7ded8f2465cf7 100644
|
| --- a/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_arc_home_service.cc
|
| +++ b/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_arc_home_service.cc
|
| @@ -28,6 +28,7 @@
|
| #include "ui/aura/window.h"
|
| #include "ui/snapshot/snapshot.h"
|
| #include "ui/wm/public/activation_client.h"
|
| +#include "url/gurl.h"
|
|
|
| namespace arc {
|
|
|
| @@ -64,10 +65,17 @@ mojom::VoiceInteractionStructurePtr CreateVoiceInteractionStructure(
|
|
|
| void RequestVoiceInteractionStructureCallback(
|
| const base::Callback<void(mojom::VoiceInteractionStructurePtr)>& callback,
|
| + const gfx::Rect& bounds,
|
| + const std::string& web_url,
|
| const ui::AXTreeUpdate& update) {
|
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| - callback.Run(CreateVoiceInteractionStructure(
|
| + auto root = mojom::VoiceInteractionStructure::New();
|
| + root->rect = bounds;
|
| + root->class_name = "android.view.dummy.root.WebUrl";
|
| + root->text = base::UTF8ToUTF16(web_url);
|
| + root->children.push_back(CreateVoiceInteractionStructure(
|
| *ui::AXSnapshotNodeAndroid::Create(update, false)));
|
| + callback.Run(std::move(root));
|
| }
|
|
|
| } // namespace
|
| @@ -121,7 +129,9 @@ void ArcVoiceInteractionArcHomeService::GetVoiceInteractionStructure(
|
| }
|
|
|
| web_contents->RequestAXTreeSnapshot(
|
| - base::Bind(&RequestVoiceInteractionStructureCallback, callback));
|
| + base::Bind(&RequestVoiceInteractionStructureCallback, callback,
|
| + browser->window()->GetBounds(),
|
| + web_contents->GetLastCommittedURL().spec()));
|
| }
|
|
|
| void ArcVoiceInteractionArcHomeService::OnVoiceInteractionOobeSetupComplete() {
|
|
|