| 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 #include "content/renderer/speech_input_dispatcher.h" | 5 #include "content/renderer/speech_input_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "content/common/speech_input_messages.h" | 8 #include "content/common/speech_input_messages.h" |
| 9 #include "content/renderer/render_view_impl.h" | 9 #include "content/renderer/render_view_impl.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
| 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSpeechInputListene
r.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSpeechInputListene
r.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 20 | 20 |
| 21 using WebKit::WebDocument; | 21 using WebKit::WebDocument; |
| 22 using WebKit::WebElement; | 22 using WebKit::WebElement; |
| 23 using WebKit::WebFrame; | 23 using WebKit::WebFrame; |
| 24 using WebKit::WebInputElement; | 24 using WebKit::WebInputElement; |
| 25 using WebKit::WebNode; | 25 using WebKit::WebNode; |
| 26 using WebKit::WebView; | 26 using WebKit::WebView; |
| 27 | 27 |
| 28 SpeechInputDispatcher::SpeechInputDispatcher( | 28 SpeechInputDispatcher::SpeechInputDispatcher( |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 return; | 131 return; |
| 132 if (!input_element->isSpeechInputEnabled()) | 132 if (!input_element->isSpeechInputEnabled()) |
| 133 return; | 133 return; |
| 134 | 134 |
| 135 if (input_element->getSpeechInputState() == WebInputElement::Idle) { | 135 if (input_element->getSpeechInputState() == WebInputElement::Idle) { |
| 136 input_element->startSpeechInput(); | 136 input_element->startSpeechInput(); |
| 137 } else { | 137 } else { |
| 138 input_element->stopSpeechInput(); | 138 input_element->stopSpeechInput(); |
| 139 } | 139 } |
| 140 } | 140 } |
| OLD | NEW |