Commit b1ec21c0 authored by muyuanli's avatar muyuanli Committed by Commit bot

add interface to start first run when voice interaction oobe is completed

BUG=b:38123645
TEST=First run tutorial is started after voice interaction
  OOBE completed broadcast.

Review-Url: https://codereview.chromium.org/2881283002
Cr-Commit-Position: refs/heads/master@{#472188}
parent f53247a6
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/first_run/first_run_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list.h"
...@@ -111,6 +112,11 @@ void ArcVoiceInteractionArcHomeService::GetVoiceInteractionStructure( ...@@ -111,6 +112,11 @@ void ArcVoiceInteractionArcHomeService::GetVoiceInteractionStructure(
base::Bind(&RequestVoiceInteractionStructureCallback, callback)); base::Bind(&RequestVoiceInteractionStructureCallback, callback));
} }
void ArcVoiceInteractionArcHomeService::OnVoiceInteractionOobeSetupComplete() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
chromeos::FirstRunController::Start();
}
// static // static
mojom::VoiceInteractionStructurePtr mojom::VoiceInteractionStructurePtr
ArcVoiceInteractionArcHomeService::CreateVoiceInteractionStructureForTesting( ArcVoiceInteractionArcHomeService::CreateVoiceInteractionStructureForTesting(
......
...@@ -34,6 +34,7 @@ class ArcVoiceInteractionArcHomeService ...@@ -34,6 +34,7 @@ class ArcVoiceInteractionArcHomeService
// Gets view hierarchy from current focused app and send it to ARC. // Gets view hierarchy from current focused app and send it to ARC.
void GetVoiceInteractionStructure( void GetVoiceInteractionStructure(
const GetVoiceInteractionStructureCallback& callback) override; const GetVoiceInteractionStructureCallback& callback) override;
void OnVoiceInteractionOobeSetupComplete() override;
static mojom::VoiceInteractionStructurePtr static mojom::VoiceInteractionStructurePtr
CreateVoiceInteractionStructureForTesting( CreateVoiceInteractionStructureForTesting(
......
...@@ -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: 1 // Next MinVersion: 2
module arc.mojom; module arc.mojom;
...@@ -50,12 +50,16 @@ struct VoiceInteractionStructure { ...@@ -50,12 +50,16 @@ struct VoiceInteractionStructure {
}; };
// Handles voice interaction queries from Android. // Handles voice interaction queries from Android.
// Next method ID: 1 // Next method ID: 3
interface VoiceInteractionArcHomeHost { interface VoiceInteractionArcHomeHost {
// Returns view hierarchy of current window represented as // Returns view hierarchy of current window represented as
// VoiceInteractionStructure. Returns empty if the request // VoiceInteractionStructure. Returns empty if the request
// fails. // fails.
GetVoiceInteractionStructure@1() => (VoiceInteractionStructure? structure); GetVoiceInteractionStructure@1() => (VoiceInteractionStructure? structure);
// Notifies VoiceInteractionArcHomeHost that voice interaction OOBE setup
// is done.
[MinVersion=1] OnVoiceInteractionOobeSetupComplete@2();
}; };
// Connects with ArcHome. // Connects with ArcHome.
......
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