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

Side by Side Diff: chrome/browser/ui/app_list/speech_recognizer_delegate.h

Issue 676593003: Implement native speech recognition for the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass in WeakPtr<Delegate>. Created 6 years, 1 month 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_
7
8 #include <stdint.h>
9
10 #include "base/strings/string16.h"
11 #include "ui/app_list/speech_ui_model_observer.h"
12
13 namespace content {
14 class WebContents;
15 }
16
17 namespace app_list {
18
19 // Delegate for the app list speech recognizer. All methods are called from the
20 // UI thread.
21 class SpeechRecognizerDelegate {
22 public:
23 // Receive a speech recognition result. |is_final| indicated whether the
24 // result is an intermediate or final result. If |is_final| is true, then the
25 // recognizer stops and no more results will be returned.
26 virtual void OnSpeechResult(const base::string16& query, bool is_final) = 0;
27
28 // Invoked regularly to indicate the average sound volume.
29 virtual void OnSpeechSoundLevelChanged(int16_t level) = 0;
30
31 // Invoked when the state of speech recognition is changed.
32 virtual void OnSpeechRecognitionStateChanged(
33 SpeechRecognitionState new_state) = 0;
34
35 // Return a WebContents that is whitelisted to use the speech recognizer.
36 // TODO(amistry): This is an implementation detail that shouldn't be
37 // necessary. Somehow, eliminate this dependency.
38 virtual content::WebContents* GetSpeechContents() = 0;
39
40 protected:
41 virtual ~SpeechRecognizerDelegate() {}
42 };
43
44 } // namespace app_list
45
46 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/speech_recognizer_browsertest.cc ('k') | chrome/browser/ui/app_list/start_page_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698