Chromium Code Reviews| Index: content/browser/speech/speech_recognition_manager_impl.h |
| diff --git a/content/browser/speech/speech_recognition_manager_impl.h b/content/browser/speech/speech_recognition_manager_impl.h |
| index 5f4a3d39122ff289dfb18df11646b55218d9eed8..af2dbda1710a781a9be144c65d6666e48dc39768 100644 |
| --- a/content/browser/speech/speech_recognition_manager_impl.h |
| +++ b/content/browser/speech/speech_recognition_manager_impl.h |
| @@ -21,6 +21,7 @@ |
| namespace content { |
| class BrowserMainLoop; |
| +class MediaStreamUIProxy; |
| class SpeechRecognitionManagerDelegate; |
| class SpeechRecognizer; |
| @@ -123,6 +124,7 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl : |
| SpeechRecognitionSessionConfig config; |
| SpeechRecognitionSessionContext context; |
| scoped_refptr<SpeechRecognizer> recognizer; |
| + scoped_ptr<MediaStreamUIProxy> ui; |
| }; |
| // Callback issued by the SpeechRecognitionManagerDelegate for reporting |
| @@ -131,19 +133,21 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl : |
| bool ask_user, |
| bool is_allowed); |
| - // Callback to get back the result of a media request. |label| is the string |
| - // to identify the request; |devices| is an array of devices approved to be |
| - // used for the request, |devices| is empty if the users deny the request. |
| - void MediaRequestPermissionCallback(const std::string& label, |
| - const MediaStreamDevices& devices); |
| + // Callback to get back the result of a media request. |devices| is an array |
| + // of devices approved to be used for the request, |devices| is empty if the |
| + // users deny the request. |
| + void MediaRequestPermissionCallback(int session_id, |
| + const MediaStreamDevices& devices, |
| + scoped_ptr<MediaStreamUIProxy> stream_ui); |
| // Entry point for pushing any external event into the session handling FSM. |
| void DispatchEvent(int session_id, FSMEvent event); |
| // Defines the behavior of the session handling FSM, selecting the appropriate |
| // transition according to the session, its current state and the event. |
| - void ExecuteTransitionAndGetNextState( |
| - const Session& session, FSMState session_state, FSMEvent event); |
| + void ExecuteTransitionAndGetNextState(Session* session, |
| + FSMState session_state, |
| + FSMEvent event); |
| // Retrieves the state of the session, enquiring directly the recognizer. |
| FSMState GetSessionState(int session_id) const; |
| @@ -153,16 +157,16 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl : |
| void SessionAbort(const Session& session); |
| void SessionStopAudioCapture(const Session& session); |
| void ResetCapturingSessionId(const Session& session); |
| - void SessionDelete(const Session& session); |
| + void SessionDelete(Session* session); |
| void NotFeasible(const Session& session, FSMEvent event); |
| bool SessionExists(int session_id) const; |
| - const Session& GetSession(int session_id) const; |
| + Session* GetSession(int session_id) const; |
| SpeechRecognitionEventListener* GetListener(int session_id) const; |
| SpeechRecognitionEventListener* GetDelegateListener() const; |
| int GetNextSessionID(); |
| - typedef std::map<int, Session> SessionsTable; |
| + typedef std::map<int, Session*> SessionsTable; |
|
tommi (sloooow) - chröme
2013/04/22 13:22:39
can we use scoped_ptr<> and Pass() to protect agai
Sergey Ulanov
2013/04/23 05:21:44
No. STL collections work only with copyable types,
|
| SessionsTable sessions_; |
| int primary_session_id_; |
| int last_session_id_; |