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 #include <string> |
10 | 10 |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "ui/app_list/speech_ui_model_observer.h" | 12 #include "ui/app_list/speech_ui_model_observer.h" |
13 | 13 |
14 namespace content { | |
15 class WebContents; | |
16 } | |
17 | |
18 namespace app_list { | 14 namespace app_list { |
19 | 15 |
20 // Delegate for the app list speech recognizer. All methods are called from the | 16 // Delegate for the app list speech recognizer. All methods are called from the |
21 // UI thread. | 17 // UI thread. |
22 class SpeechRecognizerDelegate { | 18 class SpeechRecognizerDelegate { |
23 public: | 19 public: |
24 // Receive a speech recognition result. |is_final| indicated whether the | 20 // Receive a speech recognition result. |is_final| indicated whether the |
25 // result is an intermediate or final result. If |is_final| is true, then the | 21 // result is an intermediate or final result. If |is_final| is true, then the |
26 // recognizer stops and no more results will be returned. | 22 // recognizer stops and no more results will be returned. |
27 virtual void OnSpeechResult(const base::string16& query, bool is_final) = 0; | 23 virtual void OnSpeechResult(const base::string16& query, bool is_final) = 0; |
(...skipping 10 matching lines...) Expand all Loading... |
38 virtual void GetSpeechAuthParameters(std::string* auth_scope, | 34 virtual void GetSpeechAuthParameters(std::string* auth_scope, |
39 std::string* auth_token) = 0; | 35 std::string* auth_token) = 0; |
40 | 36 |
41 protected: | 37 protected: |
42 virtual ~SpeechRecognizerDelegate() {} | 38 virtual ~SpeechRecognizerDelegate() {} |
43 }; | 39 }; |
44 | 40 |
45 } // namespace app_list | 41 } // namespace app_list |
46 | 42 |
47 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_ | 43 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_DELEGATE_H_ |
OLD | NEW |