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

Side by Side Diff: content/public/browser/speech_recognition_manager.h

Issue 170243005: Making sure that SpeechRecognitionDispatcherHost is not used after free (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed comments Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_ 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 30 matching lines...) Expand all
41 // Creates a new recognition session. 41 // Creates a new recognition session.
42 virtual int CreateSession(const SpeechRecognitionSessionConfig& config) = 0; 42 virtual int CreateSession(const SpeechRecognitionSessionConfig& config) = 0;
43 43
44 // Starts/restarts recognition for an existing session, after performing a 44 // Starts/restarts recognition for an existing session, after performing a
45 // premilinary check on the delegate (CheckRecognitionIsAllowed). 45 // premilinary check on the delegate (CheckRecognitionIsAllowed).
46 virtual void StartSession(int session_id) = 0; 46 virtual void StartSession(int session_id) = 0;
47 47
48 // Aborts recognition for an existing session, without providing any result. 48 // Aborts recognition for an existing session, without providing any result.
49 virtual void AbortSession(int session_id) = 0; 49 virtual void AbortSession(int session_id) = 0;
50 50
51 // Aborts all sessions for a given listener, without providing any result. 51 // Aborts all sessions for a given render process,
52 virtual void AbortAllSessionsForListener( 52 // without providing any result.
53 SpeechRecognitionEventListener* listener) = 0; 53 virtual void AbortAllSessionsForRenderProcess(int render_process_id) = 0;
54 54
55 // Aborts all sessions for a given RenderView, without providing any result. 55 // Aborts all sessions for a given RenderView, without providing any result.
56 virtual void AbortAllSessionsForRenderView(int render_process_id, 56 virtual void AbortAllSessionsForRenderView(int render_process_id,
57 int render_view_id) = 0; 57 int render_view_id) = 0;
58 58
59 // Stops audio capture for an existing session. The audio captured before the 59 // Stops audio capture for an existing session. The audio captured before the
60 // call will be processed, possibly ending up with a result. 60 // call will be processed, possibly ending up with a result.
61 virtual void StopAudioCaptureForSession(int session_id) = 0; 61 virtual void StopAudioCaptureForSession(int session_id) = 0;
62 62
63 // Retrieves the configuration of a session, as provided by the caller 63 // Retrieves the configuration of a session, as provided by the caller
(...skipping 25 matching lines...) Expand all
89 protected: 89 protected:
90 virtual ~SpeechRecognitionManager() {} 90 virtual ~SpeechRecognitionManager() {}
91 91
92 private: 92 private:
93 static SpeechRecognitionManager* manager_for_tests_; 93 static SpeechRecognitionManager* manager_for_tests_;
94 }; 94 };
95 95
96 } // namespace content 96 } // namespace content
97 97
98 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_ 98 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_manager_impl.cc ('k') | content/public/browser/speech_recognition_session_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698