| OLD | NEW |
| 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_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 int session_id, | 46 int session_id, |
| 47 const SpeechRecognitionResults& results) OVERRIDE; | 47 const SpeechRecognitionResults& results) OVERRIDE; |
| 48 virtual void OnRecognitionError( | 48 virtual void OnRecognitionError( |
| 49 int session_id, | 49 int session_id, |
| 50 const SpeechRecognitionError& error) OVERRIDE; | 50 const SpeechRecognitionError& error) OVERRIDE; |
| 51 virtual void OnAudioLevelsChange(int session_id, | 51 virtual void OnAudioLevelsChange(int session_id, |
| 52 float volume, | 52 float volume, |
| 53 float noise_volume) OVERRIDE; | 53 float noise_volume) OVERRIDE; |
| 54 | 54 |
| 55 // BrowserMessageFilter implementation. | 55 // BrowserMessageFilter implementation. |
| 56 virtual bool OnMessageReceived(const IPC::Message& message, | 56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 57 bool* message_was_ok) OVERRIDE; | |
| 58 virtual void OverrideThreadForMessage( | 57 virtual void OverrideThreadForMessage( |
| 59 const IPC::Message& message, | 58 const IPC::Message& message, |
| 60 BrowserThread::ID* thread) OVERRIDE; | 59 BrowserThread::ID* thread) OVERRIDE; |
| 61 | 60 |
| 62 virtual void OnChannelClosing() OVERRIDE; | 61 virtual void OnChannelClosing() OVERRIDE; |
| 63 | 62 |
| 64 private: | 63 private: |
| 65 virtual ~SpeechRecognitionDispatcherHost(); | 64 virtual ~SpeechRecognitionDispatcherHost(); |
| 66 | 65 |
| 67 void OnStartRequest( | 66 void OnStartRequest( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 82 // about this class being destroyed in the meanwhile (due to browser shutdown) | 81 // about this class being destroyed in the meanwhile (due to browser shutdown) |
| 83 // since tasks pending on a destroyed WeakPtr are automatically discarded. | 82 // since tasks pending on a destroyed WeakPtr are automatically discarded. |
| 84 base::WeakPtrFactory<SpeechRecognitionDispatcherHost> weak_factory_; | 83 base::WeakPtrFactory<SpeechRecognitionDispatcherHost> weak_factory_; |
| 85 | 84 |
| 86 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcherHost); | 85 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcherHost); |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 } // namespace content | 88 } // namespace content |
| 90 | 89 |
| 91 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ | 90 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ |
| OLD | NEW |