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

Side by Side Diff: ui/app_list/speech_ui_model.h

Issue 149753002: Enables the 'hotword not listening' icon in the search box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix breaks Created 6 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/search_box_model.cc ('k') | ui/app_list/speech_ui_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 UI_APP_LIST_SPEECH_UI_MODEL_H_ 5 #ifndef UI_APP_LIST_SPEECH_UI_MODEL_H_
6 #define UI_APP_LIST_SPEECH_UI_MODEL_H_ 6 #define UI_APP_LIST_SPEECH_UI_MODEL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/app_list/app_list_export.h" 11 #include "ui/app_list/app_list_export.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 app_list { 14 namespace app_list {
15 15
16 // SpeechUIModel provides the interface to update the UI for speech recognition. 16 // SpeechUIModel provides the interface to update the UI for speech recognition.
17 class APP_LIST_EXPORT SpeechUIModel { 17 class APP_LIST_EXPORT SpeechUIModel {
18 public: 18 public:
19 SpeechUIModel(); 19 explicit SpeechUIModel(SpeechRecognitionState initial_state);
20 virtual ~SpeechUIModel(); 20 virtual ~SpeechUIModel();
21 21
22 void SetSpeechResult(const base::string16& result, bool is_final); 22 void SetSpeechResult(const base::string16& result, bool is_final);
23 void UpdateSoundLevel(int16 level); 23 void UpdateSoundLevel(int16 level);
24 void SetSpeechRecognitionState(SpeechRecognitionState new_state); 24 void SetSpeechRecognitionState(SpeechRecognitionState new_state);
25 25
26 void AddObserver(SpeechUIModelObserver* observer); 26 void AddObserver(SpeechUIModelObserver* observer);
27 void RemoveObserver(SpeechUIModelObserver* observer); 27 void RemoveObserver(SpeechUIModelObserver* observer);
28 28
29 const base::string16& result() const { return result_; } 29 const base::string16& result() const { return result_; }
(...skipping 12 matching lines...) Expand all
42 int16 maximum_sound_level_; 42 int16 maximum_sound_level_;
43 43
44 ObserverList<SpeechUIModelObserver> observers_; 44 ObserverList<SpeechUIModelObserver> observers_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(SpeechUIModel); 46 DISALLOW_COPY_AND_ASSIGN(SpeechUIModel);
47 }; 47 };
48 48
49 } // namespace app_list 49 } // namespace app_list
50 50
51 #endif // UI_APP_LIST_SPEECH_UI_MODEL_H_ 51 #endif // UI_APP_LIST_SPEECH_UI_MODEL_H_
OLDNEW
« no previous file with comments | « ui/app_list/search_box_model.cc ('k') | ui/app_list/speech_ui_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698