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

Side by Side Diff: chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.h

Issue 2912593002: Create OOBE screen for Voice Interaction value proposition (Closed)
Patch Set: Create OOBE screen for Voice Interaction value proposition 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_VOICE_INTERACTION_ARC_VOICE_INTERACTION_FRAM EWORK_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_VOICE_INTERACTION_ARC_VOICE_INTERACTION_FRAM EWORK_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_VOICE_INTERACTION_ARC_VOICE_INTERACTION_FRAM EWORK_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_VOICE_INTERACTION_ARC_VOICE_INTERACTION_FRAM EWORK_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void SetVoiceInteractionEnabled(bool enable); 70 void SetVoiceInteractionEnabled(bool enable);
71 71
72 // Turn on / off voice interaction context (screenshot and structural data) 72 // Turn on / off voice interaction context (screenshot and structural data)
73 // in ARC. 73 // in ARC.
74 void SetVoiceInteractionContextEnabled(bool enable); 74 void SetVoiceInteractionContextEnabled(bool enable);
75 75
76 // Checks whether the caller is called within the time limit since last user 76 // Checks whether the caller is called within the time limit since last user
77 // initiated interaction. Logs UMA metric when it's not. 77 // initiated interaction. Logs UMA metric when it's not.
78 bool ValidateTimeSinceUserInteraction(); 78 bool ValidateTimeSinceUserInteraction();
79 79
80 // Start the voice interaction setup wizard in container.
81 void StartVoiceInteractionSetupWizard();
82
80 // For supporting ArcServiceManager::GetService<T>(). 83 // For supporting ArcServiceManager::GetService<T>().
81 static const char kArcServiceName[]; 84 static const char kArcServiceName[];
82 85
83 private: 86 private:
84 void SetMetalayerVisibility(bool visible); 87 void SetMetalayerVisibility(bool visible);
85 88
86 bool InitiateUserInteraction(); 89 bool InitiateUserInteraction();
87 90
88 mojo::Binding<mojom::VoiceInteractionFrameworkHost> binding_; 91 mojo::Binding<mojom::VoiceInteractionFrameworkHost> binding_;
89 base::Closure metalayer_closed_callback_; 92 base::Closure metalayer_closed_callback_;
90 bool metalayer_enabled_ = false; 93 bool metalayer_enabled_ = false;
91 94
92 // The time when a user initated an interaction. 95 // The time when a user initated an interaction.
93 base::TimeTicks user_interaction_start_time_; 96 base::TimeTicks user_interaction_start_time_;
94 97
95 // The number of allowed requests from container. Maximum is 2 (1 for 98 // The number of allowed requests from container. Maximum is 2 (1 for
96 // screenshot and 1 for view hierarchy). This amount decreases after each 99 // screenshot and 1 for view hierarchy). This amount decreases after each
97 // context request or resets when allowed time frame is elapsed. When this 100 // context request or resets when allowed time frame is elapsed. When this
98 // quota is 0, but we still get requests from the container side, we assume 101 // quota is 0, but we still get requests from the container side, we assume
99 // something malicious is going on. 102 // something malicious is going on.
100 int32_t context_request_remaining_count_ = 0; 103 int32_t context_request_remaining_count_ = 0;
101 104
102 DISALLOW_COPY_AND_ASSIGN(ArcVoiceInteractionFrameworkService); 105 DISALLOW_COPY_AND_ASSIGN(ArcVoiceInteractionFrameworkService);
103 }; 106 };
104 107
105 } // namespace arc 108 } // namespace arc
106 #endif // CHROME_BROWSER_CHROMEOS_ARC_VOICE_INTERACTION_ARC_VOICE_INTERACTION_F RAMEWORK_SERVICE_H_ 109 #endif // CHROME_BROWSER_CHROMEOS_ARC_VOICE_INTERACTION_ARC_VOICE_INTERACTION_F RAMEWORK_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698