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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 toFontResource(resource)->setCORSFailed(); | 608 toFontResource(resource)->setCORSFailed(); |
609 if (frame() && frame()->document()) { | 609 if (frame() && frame()->document()) { |
610 String resourceType = Resource::resourceTypeToString(resource->type(
), resource->options().initiatorInfo); | 610 String resourceType = Resource::resourceTypeToString(resource->type(
), resource->options().initiatorInfo); |
611 frame()->document()->addConsoleMessage(ConsoleMessage::create(JSMess
ageSource, ErrorMessageLevel, resourceType + " from origin '" + SecurityOrigin::
create(url)->toString() + "' has been blocked from loading by Cross-Origin Resou
rce Sharing policy: " + errorDescription)); | 611 frame()->document()->addConsoleMessage(ConsoleMessage::create(JSMess
ageSource, ErrorMessageLevel, resourceType + " from origin '" + SecurityOrigin::
create(url)->toString() + "' has been blocked from loading by Cross-Origin Resou
rce Sharing policy: " + errorDescription)); |
612 } | 612 } |
613 return false; | 613 return false; |
614 } | 614 } |
615 return true; | 615 return true; |
616 } | 616 } |
617 | 617 |
| 618 bool ResourceFetcher::isControlledByServiceWorker() |
| 619 { |
| 620 LocalFrame* localFrame = frame(); |
| 621 if (!localFrame) |
| 622 return false; |
| 623 if (!m_documentLoader) |
| 624 return false; |
| 625 return localFrame->loader().client()->isControlledByServiceWorker(*m_documen
tLoader); |
| 626 } |
| 627 |
618 bool ResourceFetcher::shouldLoadNewResource(Resource::Type type) const | 628 bool ResourceFetcher::shouldLoadNewResource(Resource::Type type) const |
619 { | 629 { |
620 if (!frame()) | 630 if (!frame()) |
621 return false; | 631 return false; |
622 if (!m_documentLoader) | 632 if (!m_documentLoader) |
623 return true; | 633 return true; |
624 if (type == Resource::MainResource) | 634 if (type == Resource::MainResource) |
625 return m_documentLoader == frame()->loader().provisionalDocumentLoader()
; | 635 return m_documentLoader == frame()->loader().provisionalDocumentLoader()
; |
626 return m_documentLoader == frame()->loader().documentLoader(); | 636 return m_documentLoader == frame()->loader().documentLoader(); |
627 } | 637 } |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 | 1533 |
1524 void ResourceFetcher::trace(Visitor* visitor) | 1534 void ResourceFetcher::trace(Visitor* visitor) |
1525 { | 1535 { |
1526 visitor->trace(m_document); | 1536 visitor->trace(m_document); |
1527 visitor->trace(m_loaders); | 1537 visitor->trace(m_loaders); |
1528 visitor->trace(m_multipartLoaders); | 1538 visitor->trace(m_multipartLoaders); |
1529 ResourceLoaderHost::trace(visitor); | 1539 ResourceLoaderHost::trace(visitor); |
1530 } | 1540 } |
1531 | 1541 |
1532 } | 1542 } |
OLD | NEW |