Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.cc

Issue 2929963002: Add value proposition entrypoint from Voice Interaction shortcut (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.cc
diff --git a/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.cc b/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.cc
index d3b1adb861a55fd187fc79fbe7b435836ab349ca..f87c8441940ed820c1d12b11f2bd748139c726b2 100644
--- a/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.cc
+++ b/chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.cc
@@ -20,9 +20,14 @@
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/task_scheduler/post_task.h"
+#include "chrome/browser/chromeos/login/helper.h"
+#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
+#include "chrome/common/pref_names.h"
#include "chromeos/chromeos_switches.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_util.h"
@@ -360,6 +365,18 @@ void ArcVoiceInteractionFrameworkService::StartSessionFromUserInteraction(
const gfx::Rect& rect) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ if (!ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean(
+ prefs::kArcVoiceInteractionValuePropAccepted)) {
+ // If voice interaction value prop has not been accepted, show the value
+ // prop OOBE page again.
+ gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size()));
+ chromeos::LoginDisplayHostImpl* display_host =
+ new chromeos::LoginDisplayHostImpl(screen_bounds);
Luis Héctor Chávez 2017/06/09 18:15:07 Please add a comment about the lifetime of this ob
yueli 2017/06/12 20:10:07 Done.
+ display_host->StartWizard(
+ chromeos::OobeScreen::SCREEN_VOICE_INTERACTION_VALUE_PROP);
+ return;
+ }
+
if (!arc_bridge_service()->voice_interaction_framework()->has_instance()) {
SetArcCpuRestriction(false);
return;
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/wizard_controller.h » ('j') | chrome/browser/chromeos/login/wizard_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698