OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/renderer/test_runner/MockWebSpeechRecognizer.h" | 5 #include "content/shell/renderer/test_runner/MockWebSpeechRecognizer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 8 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
9 #include "third_party/WebKit/public/web/WebSpeechRecognitionResult.h" | 9 #include "third_party/WebKit/public/web/WebSpeechRecognitionResult.h" |
10 #include "third_party/WebKit/public/web/WebSpeechRecognizerClient.h" | 10 #include "third_party/WebKit/public/web/WebSpeechRecognizerClient.h" |
11 | 11 |
12 using namespace blink; | 12 using namespace blink; |
13 using namespace std; | |
14 | 13 |
15 namespace content { | 14 namespace content { |
16 | 15 |
17 namespace { | 16 namespace { |
18 | 17 |
19 // Task class for calling a client function that does not take any parameters. | 18 // Task class for calling a client function that does not take any parameters. |
20 typedef void (WebSpeechRecognizerClient::*ClientFunctionPointer)(const WebSpeech
RecognitionHandle&); | 19 typedef void (WebSpeechRecognizerClient::*ClientFunctionPointer)(const WebSpeech
RecognitionHandle&); |
21 class ClientCallTask : public MockWebSpeechRecognizer::Task { | 20 class ClientCallTask : public MockWebSpeechRecognizer::Task { |
22 public: | 21 public: |
23 ClientCallTask(MockWebSpeechRecognizer* mock, ClientFunctionPointer function
) | 22 ClientCallTask(MockWebSpeechRecognizer* mock, ClientFunctionPointer function
) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 217 |
219 if (m_object->m_taskQueue.empty()) { | 218 if (m_object->m_taskQueue.empty()) { |
220 m_object->m_taskQueueRunning = false; | 219 m_object->m_taskQueueRunning = false; |
221 return; | 220 return; |
222 } | 221 } |
223 | 222 |
224 m_object->m_delegate->postTask(new StepTask(m_object)); | 223 m_object->m_delegate->postTask(new StepTask(m_object)); |
225 } | 224 } |
226 | 225 |
227 } // namespace content | 226 } // namespace content |
OLD | NEW |