OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 return false; | 646 return false; |
647 info->setInitiatorType(frame()->deprecatedLocalOwner()->localName()); | 647 info->setInitiatorType(frame()->deprecatedLocalOwner()->localName()); |
648 return true; | 648 return true; |
649 } | 649 } |
650 | 650 |
651 void FrameFetchContext::sendImagePing(const KURL& url) | 651 void FrameFetchContext::sendImagePing(const KURL& url) |
652 { | 652 { |
653 PingLoader::loadImage(frame(), url); | 653 PingLoader::loadImage(frame(), url); |
654 } | 654 } |
655 | 655 |
656 void FrameFetchContext::addConsoleMessage(const String& message) const | 656 void FrameFetchContext::addConsoleMessage(const String& message, LogMessageType
messageType) const |
657 { | 657 { |
| 658 MessageLevel level = messageType == LogWarningMessage ? WarningMessageLevel
: ErrorMessageLevel; |
658 if (frame()->document()) | 659 if (frame()->document()) |
659 frame()->document()->addConsoleMessage(ConsoleMessage::create(JSMessageS
ource, ErrorMessageLevel, message)); | 660 frame()->document()->addConsoleMessage(ConsoleMessage::create(JSMessageS
ource, level, message)); |
660 } | 661 } |
661 | 662 |
662 SecurityOrigin* FrameFetchContext::getSecurityOrigin() const | 663 SecurityOrigin* FrameFetchContext::getSecurityOrigin() const |
663 { | 664 { |
664 return m_document ? m_document->getSecurityOrigin() : nullptr; | 665 return m_document ? m_document->getSecurityOrigin() : nullptr; |
665 } | 666 } |
666 | 667 |
667 void FrameFetchContext::upgradeInsecureRequest(ResourceRequest& resourceRequest) | 668 void FrameFetchContext::upgradeInsecureRequest(ResourceRequest& resourceRequest) |
668 { | 669 { |
669 frame()->loader().upgradeInsecureRequest(resourceRequest, m_document); | 670 frame()->loader().upgradeInsecureRequest(resourceRequest, m_document); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 } | 800 } |
800 | 801 |
801 DEFINE_TRACE(FrameFetchContext) | 802 DEFINE_TRACE(FrameFetchContext) |
802 { | 803 { |
803 visitor->trace(m_document); | 804 visitor->trace(m_document); |
804 visitor->trace(m_documentLoader); | 805 visitor->trace(m_documentLoader); |
805 FetchContext::trace(visitor); | 806 FetchContext::trace(visitor); |
806 } | 807 } |
807 | 808 |
808 } // namespace blink | 809 } // namespace blink |
OLD | NEW |