| 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
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 // This object may be dead here. | 617 // This object may be dead here. |
| 618 } | 618 } |
| 619 | 619 |
| 620 void Resource::allClientsRemoved() | 620 void Resource::allClientsRemoved() |
| 621 { | 621 { |
| 622 if (!m_loader) | 622 if (!m_loader) |
| 623 return; | 623 return; |
| 624 if (m_type == MainResource || m_type == Raw) | 624 if (m_type == MainResource || m_type == Raw) |
| 625 cancelTimerFired(&m_cancelTimer); | 625 cancelTimerFired(&m_cancelTimer); |
| 626 else if (!m_cancelTimer.isActive()) | 626 else if (!m_cancelTimer.isActive()) |
| 627 m_cancelTimer.startOneShot(0, FROM_HERE); | 627 m_cancelTimer.startOneShot(0, BLINK_FROM_HERE); |
| 628 | 628 |
| 629 unlock(); | 629 unlock(); |
| 630 } | 630 } |
| 631 | 631 |
| 632 void Resource::cancelTimerFired(Timer<Resource>* timer) | 632 void Resource::cancelTimerFired(Timer<Resource>* timer) |
| 633 { | 633 { |
| 634 ASSERT_UNUSED(timer, timer == &m_cancelTimer); | 634 ASSERT_UNUSED(timer, timer == &m_cancelTimer); |
| 635 if (hasClients() || !m_loader) | 635 if (hasClients() || !m_loader) |
| 636 return; | 636 return; |
| 637 ResourcePtr<Resource> protect(this); | 637 ResourcePtr<Resource> protect(this); |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 } | 974 } |
| 975 | 975 |
| 976 Resource::ResourceCallback::ResourceCallback() | 976 Resource::ResourceCallback::ResourceCallback() |
| 977 : m_callbackTaskFactory(CancellableTaskFactory::create(this, &ResourceCallba
ck::runTask)) | 977 : m_callbackTaskFactory(CancellableTaskFactory::create(this, &ResourceCallba
ck::runTask)) |
| 978 { | 978 { |
| 979 } | 979 } |
| 980 | 980 |
| 981 void Resource::ResourceCallback::schedule(Resource* resource) | 981 void Resource::ResourceCallback::schedule(Resource* resource) |
| 982 { | 982 { |
| 983 if (!m_callbackTaskFactory->isPending()) | 983 if (!m_callbackTaskFactory->isPending()) |
| 984 Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->
postTask(FROM_HERE, m_callbackTaskFactory->cancelAndCreate()); | 984 Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->
postTask(BLINK_FROM_HERE, m_callbackTaskFactory->cancelAndCreate()); |
| 985 resource->assertAlive(); | 985 resource->assertAlive(); |
| 986 m_resourcesWithPendingClients.add(resource); | 986 m_resourcesWithPendingClients.add(resource); |
| 987 } | 987 } |
| 988 | 988 |
| 989 void Resource::ResourceCallback::cancel(Resource* resource) | 989 void Resource::ResourceCallback::cancel(Resource* resource) |
| 990 { | 990 { |
| 991 resource->assertAlive(); | 991 resource->assertAlive(); |
| 992 m_resourcesWithPendingClients.remove(resource); | 992 m_resourcesWithPendingClients.remove(resource); |
| 993 if (m_callbackTaskFactory->isPending() && m_resourcesWithPendingClients.isEm
pty()) | 993 if (m_callbackTaskFactory->isPending() && m_resourcesWithPendingClients.isEm
pty()) |
| 994 m_callbackTaskFactory->cancel(); | 994 m_callbackTaskFactory->cancel(); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 return "ImportResource"; | 1108 return "ImportResource"; |
| 1109 case Resource::Media: | 1109 case Resource::Media: |
| 1110 return "Media"; | 1110 return "Media"; |
| 1111 } | 1111 } |
| 1112 ASSERT_NOT_REACHED(); | 1112 ASSERT_NOT_REACHED(); |
| 1113 return "Unknown"; | 1113 return "Unknown"; |
| 1114 } | 1114 } |
| 1115 #endif // !LOG_DISABLED | 1115 #endif // !LOG_DISABLED |
| 1116 | 1116 |
| 1117 } // namespace blink | 1117 } // namespace blink |
| OLD | NEW |