| Index: chrome/browser/ui/app_list/start_page_service.h
|
| diff --git a/chrome/browser/ui/app_list/start_page_service.h b/chrome/browser/ui/app_list/start_page_service.h
|
| index e2a7c824d9227d7159c96b1178eb35a32544c4b5..ba3ce96a0014dd5635a482138a79a1bbcc192e9f 100644
|
| --- a/chrome/browser/ui/app_list/start_page_service.h
|
| +++ b/chrome/browser/ui/app_list/start_page_service.h
|
| @@ -25,6 +25,7 @@ class Profile;
|
|
|
| namespace app_list {
|
|
|
| +class AppListSpeechRecognizer;
|
| class RecommendedApps;
|
| class StartPageObserver;
|
|
|
| @@ -53,14 +54,20 @@ class StartPageService : public KeyedService {
|
| // They return essentially the same web contents but might return NULL when
|
| // some flag disables the feature.
|
| content::WebContents* GetStartPageContents();
|
| - content::WebContents* GetSpeechRecognitionContents();
|
| + virtual content::WebContents* GetSpeechRecognitionContents();
|
|
|
| RecommendedApps* recommended_apps() { return recommended_apps_.get(); }
|
| Profile* profile() { return profile_; }
|
| SpeechRecognitionState state() { return state_; }
|
| - void OnSpeechResult(const base::string16& query, bool is_final);
|
| - void OnSpeechSoundLevelChanged(int16 level);
|
| - void OnSpeechRecognitionStateChanged(SpeechRecognitionState new_state);
|
| + virtual void OnSpeechResult(const base::string16& query, bool is_final);
|
| + virtual void OnSpeechSoundLevelChanged(int16 level);
|
| + virtual void OnSpeechRecognitionStateChanged(
|
| + SpeechRecognitionState new_state);
|
| +
|
| + protected:
|
| + // Protected for testing.
|
| + explicit StartPageService(Profile* profile);
|
| + ~StartPageService() override;
|
|
|
| private:
|
| friend class StartPageServiceFactory;
|
| @@ -74,9 +81,6 @@ class StartPageService : public KeyedService {
|
| // getUserMedia() request from the web contents.
|
| class StartPageWebContentsDelegate;
|
|
|
| - explicit StartPageService(Profile* profile);
|
| - ~StartPageService() override;
|
| -
|
| void LoadContents();
|
| void UnloadContents();
|
|
|
| @@ -96,6 +100,8 @@ class StartPageService : public KeyedService {
|
| bool webui_finished_loading_;
|
| std::vector<base::Closure> pending_webui_callbacks_;
|
|
|
| + scoped_refptr<AppListSpeechRecognizer> speech_recognizer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(StartPageService);
|
| };
|
|
|
|
|