| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INPUT_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/browser/browser_message_filter.h" | 9 #include "content/browser/browser_message_filter.h" |
| 10 #include "content/browser/speech/speech_input_manager.h" | 10 #include "content/browser/speech/speech_input_manager.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public: | 23 public: |
| 24 class SpeechInputCallers; | 24 class SpeechInputCallers; |
| 25 | 25 |
| 26 SpeechInputDispatcherHost( | 26 SpeechInputDispatcherHost( |
| 27 int render_process_id, | 27 int render_process_id, |
| 28 net::URLRequestContextGetter* context_getter, | 28 net::URLRequestContextGetter* context_getter, |
| 29 SpeechInputPreferences* speech_input_preferences); | 29 SpeechInputPreferences* speech_input_preferences); |
| 30 | 30 |
| 31 // SpeechInputManager::Delegate methods. | 31 // SpeechInputManager::Delegate methods. |
| 32 virtual void SetRecognitionResult(int caller_id, | 32 virtual void SetRecognitionResult(int caller_id, |
| 33 const SpeechInputResultArray& result); | 33 const SpeechInputResult& result); |
| 34 virtual void DidCompleteRecording(int caller_id); | 34 virtual void DidCompleteRecording(int caller_id); |
| 35 virtual void DidCompleteRecognition(int caller_id); | 35 virtual void DidCompleteRecognition(int caller_id); |
| 36 | 36 |
| 37 // BrowserMessageFilter implementation. | 37 // BrowserMessageFilter implementation. |
| 38 virtual bool OnMessageReceived(const IPC::Message& message, | 38 virtual bool OnMessageReceived(const IPC::Message& message, |
| 39 bool* message_was_ok); | 39 bool* message_was_ok); |
| 40 | 40 |
| 41 // Singleton manager setter useful for tests. | 41 // Singleton manager setter useful for tests. |
| 42 CONTENT_EXPORT static void set_manager(SpeechInputManager* manager) { | 42 CONTENT_EXPORT static void set_manager(SpeechInputManager* manager) { |
| 43 manager_ = manager; | 43 manager_ = manager; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 62 scoped_refptr<SpeechInputPreferences> speech_input_preferences_; | 62 scoped_refptr<SpeechInputPreferences> speech_input_preferences_; |
| 63 | 63 |
| 64 static SpeechInputManager* manager_; | 64 static SpeechInputManager* manager_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcherHost); | 66 DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcherHost); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace speech_input | 69 } // namespace speech_input |
| 70 | 70 |
| 71 #endif // CONTENT_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ | 71 #endif // CONTENT_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ |
| OLD | NEW |