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
3 // found in the LICENSE file.
5 #include "content/shell/renderer/test_runner/WebTask.h"
8 #include "third_party/WebKit/public/web/WebKit.h"
12 namespace WebTestRunner
{
14 WebTask::WebTask(WebTaskList
* list
)
17 m_taskList
->registerTask(this);
23 m_taskList
->unregisterTask(this);
26 WebTaskList::WebTaskList()
30 WebTaskList::~WebTaskList()
35 void WebTaskList::registerTask(WebTask
* task
)
37 m_tasks
.push_back(task
);
40 void WebTaskList::unregisterTask(WebTask
* task
)
42 vector
<WebTask
*>::iterator iter
= find(m_tasks
.begin(), m_tasks
.end(), task
);
43 if (iter
!= m_tasks
.end())
47 void WebTaskList::revokeAll()
49 while (!m_tasks
.empty())