OLD | NEW |
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 | 10 |
10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #include "ui/app_list/speech_ui_model_observer.h" | 12 #include "ui/app_list/speech_ui_model_observer.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 class WebContents; | 15 class WebContents; |
15 } | 16 } |
16 | 17 |
17 namespace app_list { | 18 namespace app_list { |
18 | 19 |
(...skipping 11 matching lines...) Expand all Loading... |
30 | 31 |
31 // Invoked when the state of speech recognition is changed. | 32 // Invoked when the state of speech recognition is changed. |
32 virtual void OnSpeechRecognitionStateChanged( | 33 virtual void OnSpeechRecognitionStateChanged( |
33 SpeechRecognitionState new_state) = 0; | 34 SpeechRecognitionState new_state) = 0; |
34 | 35 |
35 // Return a WebContents that is whitelisted to use the speech recognizer. | 36 // Return a WebContents that is whitelisted to use the speech recognizer. |
36 // TODO(amistry): This is an implementation detail that shouldn't be | 37 // TODO(amistry): This is an implementation detail that shouldn't be |
37 // necessary. Somehow, eliminate this dependency. | 38 // necessary. Somehow, eliminate this dependency. |
38 virtual content::WebContents* GetSpeechContents() = 0; | 39 virtual content::WebContents* GetSpeechContents() = 0; |
39 | 40 |
| 41 // 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. |
| 43 virtual void GetSpeechAuthParameters(std::string* auth_scope, |
| 44 std::string* auth_token) = 0; |
| 45 |
40 protected: | 46 protected: |
41 virtual ~SpeechRecognizerDelegate() {} | 47 virtual ~SpeechRecognizerDelegate() {} |
42 }; | 48 }; |
43 | 49 |
44 } // namespace app_list | 50 } // namespace app_list |
45 | 51 |
46 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_ | 52 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_ |
OLD | NEW |