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

Side by Side Diff: chrome/browser/speech/speech_input_manager.h

Issue 6128001: If speech input is disabled and we receive IPC calls, terminate the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_
6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ 6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/common/speech_input_result.h" 9 #include "chrome/common/speech_input_result.h"
10 #include "gfx/rect.h" 10 #include "gfx/rect.h"
(...skipping 14 matching lines...) Expand all
25 virtual void SetRecognitionResult( 25 virtual void SetRecognitionResult(
26 int caller_id, 26 int caller_id,
27 const SpeechInputResultArray& result) = 0; 27 const SpeechInputResultArray& result) = 0;
28 virtual void DidCompleteRecording(int caller_id) = 0; 28 virtual void DidCompleteRecording(int caller_id) = 0;
29 virtual void DidCompleteRecognition(int caller_id) = 0; 29 virtual void DidCompleteRecognition(int caller_id) = 0;
30 30
31 protected: 31 protected:
32 virtual ~Delegate() {} 32 virtual ~Delegate() {}
33 }; 33 };
34 34
35 // Whether the speech input feature is enabled, based on the browser channel
36 // information and command line flags.
37 static bool IsFeatureEnabled();
38
35 // Factory method to access the singleton. We have this method here instead of 39 // Factory method to access the singleton. We have this method here instead of
36 // using Singleton<> directly in the calling code to aid tests in injection 40 // using Singleton<> directly in the calling code to aid tests in injection
37 // mocks. 41 // mocks.
38 static SpeechInputManager* Get(); 42 static SpeechInputManager* Get();
39 // Factory method definition useful for tests. 43 // Factory method definition useful for tests.
40 typedef SpeechInputManager* (AccessorMethod)(); 44 typedef SpeechInputManager* (AccessorMethod)();
41 45
42 virtual ~SpeechInputManager() {} 46 virtual ~SpeechInputManager() {}
43 47
44 // Handlers for requests from render views. 48 // Handlers for requests from render views.
(...skipping 17 matching lines...) Expand all
62 66
63 // This typedef is to workaround the issue with certain versions of 67 // This typedef is to workaround the issue with certain versions of
64 // Visual Studio where it gets confused between multiple Delegate 68 // Visual Studio where it gets confused between multiple Delegate
65 // classes and gives a C2500 error. (I saw this error on the try bots - 69 // classes and gives a C2500 error. (I saw this error on the try bots -
66 // the workaround was not needed for my machine). 70 // the workaround was not needed for my machine).
67 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate; 71 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate;
68 72
69 } // namespace speech_input 73 } // namespace speech_input
70 74
71 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ 75 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/speech/speech_input_dispatcher_host.cc ('k') | chrome/browser/speech/speech_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698