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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 Resource::ResourceCallback& Resource::ResourceCallback::callbackHandler() { | 261 Resource::ResourceCallback& Resource::ResourceCallback::callbackHandler() { |
262 DEFINE_STATIC_LOCAL(ResourceCallback, callbackHandler, ()); | 262 DEFINE_STATIC_LOCAL(ResourceCallback, callbackHandler, ()); |
263 return callbackHandler; | 263 return callbackHandler; |
264 } | 264 } |
265 | 265 |
266 Resource::ResourceCallback::ResourceCallback() {} | 266 Resource::ResourceCallback::ResourceCallback() {} |
267 | 267 |
268 void Resource::ResourceCallback::schedule(Resource* resource) { | 268 void Resource::ResourceCallback::schedule(Resource* resource) { |
269 if (!m_taskHandle.isActive()) { | 269 if (!m_taskHandle.isActive()) { |
270 // unretained(this) is safe because a posted task is canceled when | 270 // WTF::unretained(this) is safe because a posted task is canceled when |
271 // |m_taskHandle| is destroyed on the dtor of this ResourceCallback. | 271 // |m_taskHandle| is destroyed on the dtor of this ResourceCallback. |
272 m_taskHandle = | 272 m_taskHandle = |
273 Platform::current() | 273 Platform::current() |
274 ->currentThread() | 274 ->currentThread() |
275 ->scheduler() | 275 ->scheduler() |
276 ->loadingTaskRunner() | 276 ->loadingTaskRunner() |
277 ->postCancellableTask( | 277 ->postCancellableTask( |
278 BLINK_FROM_HERE, | 278 BLINK_FROM_HERE, |
279 WTF::bind(&ResourceCallback::runTask, WTF::unretained(this))); | 279 WTF::bind(&ResourceCallback::runTask, WTF::unretained(this))); |
280 } | 280 } |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 case Resource::TextTrack: | 1099 case Resource::TextTrack: |
1100 case Resource::Media: | 1100 case Resource::Media: |
1101 case Resource::Manifest: | 1101 case Resource::Manifest: |
1102 return false; | 1102 return false; |
1103 } | 1103 } |
1104 NOTREACHED(); | 1104 NOTREACHED(); |
1105 return false; | 1105 return false; |
1106 } | 1106 } |
1107 | 1107 |
1108 } // namespace blink | 1108 } // namespace blink |
OLD | NEW |