Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: components/test_runner/mock_web_speech_recognizer.cc

Issue 1805753002: Make test_runner::WebTask an internal detail of components/test_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-layout-dump-flags-dep
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/test_runner/mock_web_speech_recognizer.h" 5 #include "components/test_runner/mock_web_speech_recognizer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 250 }
251 task_queue_running_ = false; 251 task_queue_running_ = false;
252 } 252 }
253 253
254 void MockWebSpeechRecognizer::StepTask::RunIfValid() { 254 void MockWebSpeechRecognizer::StepTask::RunIfValid() {
255 if (object_->task_queue_.empty()) { 255 if (object_->task_queue_.empty()) {
256 object_->task_queue_running_ = false; 256 object_->task_queue_running_ = false;
257 return; 257 return;
258 } 258 }
259 259
260 Task* task = object_->task_queue_.front(); 260 MockWebSpeechRecognizer::Task* task = object_->task_queue_.front();
261 object_->task_queue_.pop_front(); 261 object_->task_queue_.pop_front();
262 task->run(); 262 task->run();
263 delete task; 263 delete task;
264 264
265 if (object_->task_queue_.empty()) { 265 if (object_->task_queue_.empty()) {
266 object_->task_queue_running_ = false; 266 object_->task_queue_running_ = false;
267 return; 267 return;
268 } 268 }
269 269
270 object_->delegate_->PostTask(new StepTask(object_)); 270 object_->delegate_->PostTask(new StepTask(object_));
271 } 271 }
272 272
273 } // namespace test_runner 273 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | components/test_runner/web_task.h » ('j') | content/shell/renderer/layout_test/blink_test_runner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698