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

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

Issue 797493002: Eliminate the launcher speech recognizer's dependency on the start page WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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 2014 The Chromium Authors. All rights reserved. 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 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_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 // recognizer stops and no more results will be returned. 26 // recognizer stops and no more results will be returned.
27 virtual void OnSpeechResult(const base::string16& query, bool is_final) = 0; 27 virtual void OnSpeechResult(const base::string16& query, bool is_final) = 0;
28 28
29 // Invoked regularly to indicate the average sound volume. 29 // Invoked regularly to indicate the average sound volume.
30 virtual void OnSpeechSoundLevelChanged(int16_t level) = 0; 30 virtual void OnSpeechSoundLevelChanged(int16_t level) = 0;
31 31
32 // Invoked when the state of speech recognition is changed. 32 // Invoked when the state of speech recognition is changed.
33 virtual void OnSpeechRecognitionStateChanged( 33 virtual void OnSpeechRecognitionStateChanged(
34 SpeechRecognitionState new_state) = 0; 34 SpeechRecognitionState new_state) = 0;
35 35
36 // Return a WebContents that is whitelisted to use the speech recognizer.
37 // TODO(amistry): This is an implementation detail that shouldn't be
38 // necessary. Somehow, eliminate this dependency.
39 virtual content::WebContents* GetSpeechContents() = 0;
40
41 // Get the OAuth2 scope and token to pass to the speech recognizer. Does not 36 // Get the OAuth2 scope and token to pass to the speech recognizer. Does not
42 // modify the arguments if no auth token is available or allowed. 37 // modify the arguments if no auth token is available or allowed.
43 virtual void GetSpeechAuthParameters(std::string* auth_scope, 38 virtual void GetSpeechAuthParameters(std::string* auth_scope,
44 std::string* auth_token) = 0; 39 std::string* auth_token) = 0;
45 40
46 protected: 41 protected:
47 virtual ~SpeechRecognizerDelegate() {} 42 virtual ~SpeechRecognizerDelegate() {}
48 }; 43 };
49 44
50 } // namespace app_list 45 } // namespace app_list
51 46
52 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_ 47 #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