| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 7 rights reserved. | 7 rights reserved. |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 ->scheduler() | 276 ->scheduler() |
| 277 ->loadingTaskRunner() | 277 ->loadingTaskRunner() |
| 278 ->postCancellableTask( | 278 ->postCancellableTask( |
| 279 BLINK_FROM_HERE, | 279 BLINK_FROM_HERE, |
| 280 WTF::bind(&ResourceCallback::runTask, WTF::unretained(this))); | 280 WTF::bind(&ResourceCallback::runTask, WTF::unretained(this))); |
| 281 } | 281 } |
| 282 m_resourcesWithPendingClients.insert(resource); | 282 m_resourcesWithPendingClients.insert(resource); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void Resource::ResourceCallback::cancel(Resource* resource) { | 285 void Resource::ResourceCallback::cancel(Resource* resource) { |
| 286 m_resourcesWithPendingClients.remove(resource); | 286 m_resourcesWithPendingClients.erase(resource); |
| 287 if (m_taskHandle.isActive() && m_resourcesWithPendingClients.isEmpty()) | 287 if (m_taskHandle.isActive() && m_resourcesWithPendingClients.isEmpty()) |
| 288 m_taskHandle.cancel(); | 288 m_taskHandle.cancel(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 bool Resource::ResourceCallback::isScheduled(Resource* resource) const { | 291 bool Resource::ResourceCallback::isScheduled(Resource* resource) const { |
| 292 return m_resourcesWithPendingClients.contains(resource); | 292 return m_resourcesWithPendingClients.contains(resource); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void Resource::ResourceCallback::runTask() { | 295 void Resource::ResourceCallback::runTask() { |
| 296 HeapVector<Member<Resource>> resources; | 296 HeapVector<Member<Resource>> resources; |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 case Resource::Media: | 1122 case Resource::Media: |
| 1123 case Resource::Manifest: | 1123 case Resource::Manifest: |
| 1124 case Resource::Mock: | 1124 case Resource::Mock: |
| 1125 return false; | 1125 return false; |
| 1126 } | 1126 } |
| 1127 NOTREACHED(); | 1127 NOTREACHED(); |
| 1128 return false; | 1128 return false; |
| 1129 } | 1129 } |
| 1130 | 1130 |
| 1131 } // namespace blink | 1131 } // namespace blink |
| OLD | NEW |