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/WebTask.h" | 5 #include "content/shell/renderer/test_runner/WebTask.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include "third_party/WebKit/public/web/WebKit.h" | 8 #include "third_party/WebKit/public/web/WebKit.h" |
9 | 9 |
10 using namespace std; | 10 using namespace std; |
11 | 11 |
12 namespace WebTestRunner { | 12 namespace content { |
13 | 13 |
14 WebTask::WebTask(WebTaskList* list) | 14 WebTask::WebTask(WebTaskList* list) |
15 : m_taskList(list) | 15 : m_taskList(list) |
16 { | 16 { |
17 m_taskList->registerTask(this); | 17 m_taskList->registerTask(this); |
18 } | 18 } |
19 | 19 |
20 WebTask::~WebTask() | 20 WebTask::~WebTask() |
21 { | 21 { |
22 if (m_taskList) | 22 if (m_taskList) |
(...skipping 20 matching lines...) Expand all Loading... |
43 if (iter != m_tasks.end()) | 43 if (iter != m_tasks.end()) |
44 m_tasks.erase(iter); | 44 m_tasks.erase(iter); |
45 } | 45 } |
46 | 46 |
47 void WebTaskList::revokeAll() | 47 void WebTaskList::revokeAll() |
48 { | 48 { |
49 while (!m_tasks.empty()) | 49 while (!m_tasks.empty()) |
50 m_tasks[0]->cancel(); | 50 m_tasks[0]->cancel(); |
51 } | 51 } |
52 | 52 |
53 } | 53 } // namespace content |
OLD | NEW |