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

Side by Side Diff: chrome/browser/ui/app_list/start_page_service.h

Issue 752253002: Updates the mic icon status based on the device's audio state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
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 CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // ProfileDestroyObserver to shutdown the service on exiting. WebContents 82 // ProfileDestroyObserver to shutdown the service on exiting. WebContents
83 // depends on the profile and needs to be closed before the profile and its 83 // depends on the profile and needs to be closed before the profile and its
84 // keyed service shutdown. 84 // keyed service shutdown.
85 class ProfileDestroyObserver; 85 class ProfileDestroyObserver;
86 86
87 // The WebContentsDelegate implementation for the start page. This allows 87 // The WebContentsDelegate implementation for the start page. This allows
88 // getUserMedia() request from the web contents. 88 // getUserMedia() request from the web contents.
89 class StartPageWebContentsDelegate; 89 class StartPageWebContentsDelegate;
90 90
91 #if defined(OS_CHROMEOS)
92 // This class observes the change of audio input device availability and
93 // checks if currently the system has valid audio input.
94 class AudioStatus;
95 #endif
96
91 void LoadContents(); 97 void LoadContents();
92 void UnloadContents(); 98 void UnloadContents();
93 99
94 // KeyedService overrides: 100 // KeyedService overrides:
95 void Shutdown() override; 101 void Shutdown() override;
96 102
97 Profile* profile_; 103 Profile* profile_;
98 scoped_ptr<content::WebContents> contents_; 104 scoped_ptr<content::WebContents> contents_;
99 scoped_ptr<StartPageWebContentsDelegate> contents_delegate_; 105 scoped_ptr<StartPageWebContentsDelegate> contents_delegate_;
100 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_; 106 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_;
101 scoped_ptr<RecommendedApps> recommended_apps_; 107 scoped_ptr<RecommendedApps> recommended_apps_;
102 SpeechRecognitionState state_; 108 SpeechRecognitionState state_;
103 ObserverList<StartPageObserver> observers_; 109 ObserverList<StartPageObserver> observers_;
104 bool speech_button_toggled_manually_; 110 bool speech_button_toggled_manually_;
105 bool speech_result_obtained_; 111 bool speech_result_obtained_;
106 112
107 bool webui_finished_loading_; 113 bool webui_finished_loading_;
108 std::vector<base::Closure> pending_webui_callbacks_; 114 std::vector<base::Closure> pending_webui_callbacks_;
109 115
110 scoped_ptr<SpeechRecognizer> speech_recognizer_; 116 scoped_ptr<SpeechRecognizer> speech_recognizer_;
111 117
118 #if defined(OS_CHROMEOS)
119 scoped_ptr<AudioStatus> audio_status_;
120 #endif
121
112 base::WeakPtrFactory<StartPageService> weak_factory_; 122 base::WeakPtrFactory<StartPageService> weak_factory_;
113 123
114 DISALLOW_COPY_AND_ASSIGN(StartPageService); 124 DISALLOW_COPY_AND_ASSIGN(StartPageService);
115 }; 125 };
116 126
117 } // namespace app_list 127 } // namespace app_list
118 128
119 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ 129 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698