summaryrefslogtreecommitdiffstats
path: root/content/browser/speech/speech_recognition_manager_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/speech/speech_recognition_manager_impl.h')
-rw-r--r--content/browser/speech/speech_recognition_manager_impl.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/content/browser/speech/speech_recognition_manager_impl.h b/content/browser/speech/speech_recognition_manager_impl.h
index af2dbda..5f4a3d3 100644
--- a/content/browser/speech/speech_recognition_manager_impl.h
+++ b/content/browser/speech/speech_recognition_manager_impl.h
@@ -21,7 +21,6 @@
namespace content {
class BrowserMainLoop;
-class MediaStreamUIProxy;
class SpeechRecognitionManagerDelegate;
class SpeechRecognizer;
@@ -124,7 +123,6 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl :
SpeechRecognitionSessionConfig config;
SpeechRecognitionSessionContext context;
scoped_refptr<SpeechRecognizer> recognizer;
- scoped_ptr<MediaStreamUIProxy> ui;
};
// Callback issued by the SpeechRecognitionManagerDelegate for reporting
@@ -133,21 +131,19 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl :
bool ask_user,
bool is_allowed);
- // 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);
+ // 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);
// 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(Session* session,
- FSMState session_state,
- FSMEvent event);
+ void ExecuteTransitionAndGetNextState(
+ const Session& session, FSMState session_state, FSMEvent event);
// Retrieves the state of the session, enquiring directly the recognizer.
FSMState GetSessionState(int session_id) const;
@@ -157,16 +153,16 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl :
void SessionAbort(const Session& session);
void SessionStopAudioCapture(const Session& session);
void ResetCapturingSessionId(const Session& session);
- void SessionDelete(Session* session);
+ void SessionDelete(const Session& session);
void NotFeasible(const Session& session, FSMEvent event);
bool SessionExists(int session_id) const;
- Session* GetSession(int session_id) const;
+ 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_;