| 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 e9ea5a07e7b10118941ffb52c15bb594fc0c49b9..d7cc3c1368f42cef842ff246459c105cf0d05141 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;
|
|
|
| @@ -122,6 +123,7 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl :
|
| SpeechRecognitionSessionConfig config;
|
| SpeechRecognitionSessionContext context;
|
| scoped_refptr<SpeechRecognizer> recognizer;
|
| + scoped_ptr<MediaStreamUIProxy> ui;
|
| };
|
|
|
| // Callback issued by the SpeechRecognitionManagerDelegate for reporting
|
| @@ -130,19 +132,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;
|
| @@ -152,16 +156,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;
|
| SessionsTable sessions_;
|
| int primary_session_id_;
|
| int last_session_id_;
|
|
|