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

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

Issue 6148001: Revert 70671 - If speech input is disabled and we receive IPC calls, terminat... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/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
Property Changes:
Deleted: svn:eol-style
- LF
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 "gfx/rect.h" 9 #include "gfx/rect.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 11 matching lines...) Expand all
22 class Delegate { 22 class Delegate {
23 public: 23 public:
24 virtual void SetRecognitionResult(int caller_id, const string16& value) = 0; 24 virtual void SetRecognitionResult(int caller_id, const string16& value) = 0;
25 virtual void DidCompleteRecording(int caller_id) = 0; 25 virtual void DidCompleteRecording(int caller_id) = 0;
26 virtual void DidCompleteRecognition(int caller_id) = 0; 26 virtual void DidCompleteRecognition(int caller_id) = 0;
27 27
28 protected: 28 protected:
29 virtual ~Delegate() {} 29 virtual ~Delegate() {}
30 }; 30 };
31 31
32 // Whether the speech input feature is enabled, based on the browser channel
33 // information and command line flags.
34 static bool IsFeatureEnabled();
35
36 // Factory method to access the singleton. We have this method here instead of 32 // Factory method to access the singleton. We have this method here instead of
37 // using Singleton<> directly in the calling code to aid tests in injection 33 // using Singleton<> directly in the calling code to aid tests in injection
38 // mocks. 34 // mocks.
39 static SpeechInputManager* Get(); 35 static SpeechInputManager* Get();
40 // Factory method definition useful for tests. 36 // Factory method definition useful for tests.
41 typedef SpeechInputManager* (AccessorMethod)(); 37 typedef SpeechInputManager* (AccessorMethod)();
42 38
43 virtual ~SpeechInputManager() {} 39 virtual ~SpeechInputManager() {}
44 40
45 // Handlers for requests from render views. 41 // Handlers for requests from render views.
(...skipping 15 matching lines...) Expand all
61 57
62 // This typedef is to workaround the issue with certain versions of 58 // This typedef is to workaround the issue with certain versions of
63 // Visual Studio where it gets confused between multiple Delegate 59 // Visual Studio where it gets confused between multiple Delegate
64 // classes and gives a C2500 error. (I saw this error on the try bots - 60 // classes and gives a C2500 error. (I saw this error on the try bots -
65 // the workaround was not needed for my machine). 61 // the workaround was not needed for my machine).
66 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate; 62 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate;
67 63
68 } // namespace speech_input 64 } // namespace speech_input
69 65
70 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ 66 #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