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

Side by Side Diff: content/browser/speech/speech_recognition_manager_impl.h

Issue 10071040: Fixed a memory leak in SpeechRecognitionManagerImpl causing ChromeSpeechInputManagerDelegate to be … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits according to jam@ review. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/speech/speech_recognition_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/singleton.h" 15 #include "base/memory/singleton.h"
15 #include "content/public/browser/speech_recognition_event_listener.h" 16 #include "content/public/browser/speech_recognition_event_listener.h"
16 #include "content/public/browser/speech_recognition_manager.h" 17 #include "content/public/browser/speech_recognition_manager.h"
17 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
18 19
19 namespace content { 20 namespace content {
20 class ResourceContext; 21 class ResourceContext;
21 class SpeechRecognitionManagerDelegate; 22 class SpeechRecognitionManagerDelegate;
22 class SpeechRecognitionPreferences; 23 class SpeechRecognitionPreferences;
23 struct SpeechRecognitionResult; 24 struct SpeechRecognitionResult;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const SpeechRecognitionParams& params); 113 const SpeechRecognitionParams& params);
113 void ProceedStartingRecognition(const SpeechRecognitionParams& params); 114 void ProceedStartingRecognition(const SpeechRecognitionParams& params);
114 115
115 void CancelRecognitionAndInformDelegate(int caller_id); 116 void CancelRecognitionAndInformDelegate(int caller_id);
116 117
117 typedef std::map<int, Request> SpeechRecognizerMap; 118 typedef std::map<int, Request> SpeechRecognizerMap;
118 SpeechRecognizerMap requests_; 119 SpeechRecognizerMap requests_;
119 std::string request_info_; 120 std::string request_info_;
120 bool can_report_metrics_; 121 bool can_report_metrics_;
121 int recording_caller_id_; 122 int recording_caller_id_;
122 content::SpeechRecognitionManagerDelegate* delegate_; 123 scoped_ptr<content::SpeechRecognitionManagerDelegate> delegate_;
123 }; 124 };
124 125
125 } // namespace speech 126 } // namespace speech
126 127
127 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ 128 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/speech/speech_recognition_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698