| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * Redistributions of source code must retain the above copyright | 8 * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "core/speech/SpeechInputClient.h" | 37 #include "core/speech/SpeechInputClient.h" |
| 38 #include "wtf/Forward.h" | 38 #include "wtf/Forward.h" |
| 39 #include "wtf/OwnPtr.h" | 39 #include "wtf/OwnPtr.h" |
| 40 #include "wtf/PassOwnPtr.h" | 40 #include "wtf/PassOwnPtr.h" |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 class SecurityOrigin; | 43 class SecurityOrigin; |
| 44 class SpeechInputListener; | 44 class SpeechInputListener; |
| 45 } | 45 } |
| 46 | 46 |
| 47 namespace WebKit { | 47 namespace blink { |
| 48 | 48 |
| 49 class WebSpeechInputController; | 49 class WebSpeechInputController; |
| 50 class WebViewClient; | 50 class WebViewClient; |
| 51 | 51 |
| 52 class SpeechInputClientImpl | 52 class SpeechInputClientImpl |
| 53 : public WebCore::SpeechInputClient, | 53 : public WebCore::SpeechInputClient, |
| 54 public WebSpeechInputListener { | 54 public WebSpeechInputListener { |
| 55 public: | 55 public: |
| 56 static PassOwnPtr<SpeechInputClientImpl> create(WebViewClient*); | 56 static PassOwnPtr<SpeechInputClientImpl> create(WebViewClient*); |
| 57 virtual ~SpeechInputClientImpl(); | 57 virtual ~SpeechInputClientImpl(); |
| 58 | 58 |
| 59 // SpeechInputClient methods. | 59 // SpeechInputClient methods. |
| 60 void setListener(WebCore::SpeechInputListener*); | 60 void setListener(WebCore::SpeechInputListener*); |
| 61 bool startRecognition(int requestId, const WebCore::IntRect& elementRect, co
nst AtomicString& language, const String& grammar, WebCore::SecurityOrigin*); | 61 bool startRecognition(int requestId, const WebCore::IntRect& elementRect, co
nst AtomicString& language, const String& grammar, WebCore::SecurityOrigin*); |
| 62 void stopRecording(int); | 62 void stopRecording(int); |
| 63 void cancelRecognition(int); | 63 void cancelRecognition(int); |
| 64 | 64 |
| 65 // WebSpeechInputListener methods. | 65 // WebSpeechInputListener methods. |
| 66 void didCompleteRecording(int); | 66 void didCompleteRecording(int); |
| 67 void setRecognitionResult(int, const WebSpeechInputResultArray&); | 67 void setRecognitionResult(int, const WebSpeechInputResultArray&); |
| 68 void didCompleteRecognition(int); | 68 void didCompleteRecognition(int); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 SpeechInputClientImpl(WebViewClient*); | 71 SpeechInputClientImpl(WebViewClient*); |
| 72 | 72 |
| 73 WebSpeechInputController* m_controller; // To call into the embedder. | 73 WebSpeechInputController* m_controller; // To call into the embedder. |
| 74 WebCore::SpeechInputListener* m_listener; | 74 WebCore::SpeechInputListener* m_listener; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace WebKit | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif // ENABLE(INPUT_SPEECH) | 79 #endif // ENABLE(INPUT_SPEECH) |
| 80 | 80 |
| 81 #endif // SpeechInputClientImpl_h | 81 #endif // SpeechInputClientImpl_h |
| OLD | NEW |