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

Unified Diff: content/browser/speech/speech_recognition_manager_impl.h

Issue 13989003: Replace MediaStreamUIController with MediaStreamUIProxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months 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 side-by-side diff with in-line comments
Download patch
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;
SessionsTable sessions_;
int primary_session_id_;
int last_session_id_;

Powered by Google App Engine
This is Rietveld 408576698