aw: Move SharedRendererState out of AwContents
[chromium-blink-merge.git] / ui / app_list / speech_ui_model_observer.h
blobd8b400cda04f18077593bf00698b206cffba97b2
1 // Copyright 2013 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.
5 #ifndef UI_APP_LIST_SPEECH_UI_MODEL_OBSERVER_H_
6 #define UI_APP_LIST_SPEECH_UI_MODEL_OBSERVER_H_
8 #include "base/basictypes.h"
9 #include "base/strings/string16.h"
10 #include "ui/app_list/app_list_export.h"
12 namespace app_list {
14 enum SpeechRecognitionState {
15 SPEECH_RECOGNITION_OFF = 0,
16 SPEECH_RECOGNITION_READY,
17 SPEECH_RECOGNITION_HOTWORD_LISTENING,
18 SPEECH_RECOGNITION_RECOGNIZING,
19 SPEECH_RECOGNITION_IN_SPEECH,
20 SPEECH_RECOGNITION_STOPPING,
21 SPEECH_RECOGNITION_NETWORK_ERROR,
24 class APP_LIST_EXPORT SpeechUIModelObserver {
25 public:
26 // Invoked when sound level for the speech recognition has changed. |level|
27 // represents the current sound-level in the range of [0, 255].
28 virtual void OnSpeechSoundLevelChanged(uint8 level) {}
30 // Invoked when a speech result arrives. |is_final| is true only when the
31 // speech result is final.
32 virtual void OnSpeechResult(const base::string16& result, bool is_final) {}
34 // Invoked when the state of speech recognition is changed.
35 virtual void OnSpeechRecognitionStateChanged(
36 SpeechRecognitionState new_state) {}
38 protected:
39 virtual ~SpeechUIModelObserver() {}
42 } // namespace app_list
44 #endif // UI_APP_LIST_SPEECH_UI_MODEL_OBSERVER_H_