| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; | 114 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; |
| 115 virtual void defaultEventHandler(Event*) OVERRIDE; | 115 virtual void defaultEventHandler(Event*) OVERRIDE; |
| 116 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 116 virtual bool willRespondToMouseClickEvents() OVERRIDE; |
| 117 virtual bool isInputFieldSpeechButtonElement() const OVERRIDE { return true;
} | 117 virtual bool isInputFieldSpeechButtonElement() const OVERRIDE { return true;
} |
| 118 SpeechInputState state() const { return m_state; } | 118 SpeechInputState state() const { return m_state; } |
| 119 void startSpeechInput(); | 119 void startSpeechInput(); |
| 120 void stopSpeechInput(); | 120 void stopSpeechInput(); |
| 121 | 121 |
| 122 // SpeechInputListener methods. | 122 // SpeechInputListener methods. |
| 123 void didCompleteRecording(int); | 123 virtual void didCompleteRecording(int) OVERRIDE; |
| 124 void didCompleteRecognition(int); | 124 virtual void didCompleteRecognition(int) OVERRIDE; |
| 125 void setRecognitionResult(int, const SpeechInputResultArray&); | 125 virtual void setRecognitionResult(int, const SpeechInputResultArray&) OVERRI
DE; |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 InputFieldSpeechButtonElement(Document&); | 128 InputFieldSpeechButtonElement(Document&); |
| 129 SpeechInput* speechInput(); | 129 SpeechInput* speechInput(); |
| 130 void setState(SpeechInputState state); | 130 void setState(SpeechInputState state); |
| 131 virtual bool isMouseFocusable() const OVERRIDE { return false; } | 131 virtual bool isMouseFocusable() const OVERRIDE { return false; } |
| 132 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 132 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
| 133 | 133 |
| 134 bool m_capturing; | 134 bool m_capturing; |
| 135 SpeechInputState m_state; | 135 SpeechInputState m_state; |
| 136 int m_listenerId; | 136 int m_listenerId; |
| 137 SpeechInputResultArray m_results; | 137 SpeechInputResultArray m_results; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 DEFINE_TYPE_CASTS(InputFieldSpeechButtonElement, Element, element, element->isIn
putFieldSpeechButtonElement(), element.isInputFieldSpeechButtonElement()); | 140 DEFINE_TYPE_CASTS(InputFieldSpeechButtonElement, Element, element, element->isIn
putFieldSpeechButtonElement(), element.isInputFieldSpeechButtonElement()); |
| 141 | 141 |
| 142 #endif // ENABLE(INPUT_SPEECH) | 142 #endif // ENABLE(INPUT_SPEECH) |
| 143 | 143 |
| 144 } // namespace | 144 } // namespace |
| 145 | 145 |
| 146 #endif | 146 #endif |
| OLD | NEW |