| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 | 75 |
| 76 static ImageLoader::BypassMainWorldBehavior ShouldBypassMainWorldCSP( | 76 static ImageLoader::BypassMainWorldBehavior ShouldBypassMainWorldCSP( |
| 77 ImageLoader* loader) { | 77 ImageLoader* loader) { |
| 78 DCHECK(loader); | 78 DCHECK(loader); |
| 79 DCHECK(loader->GetElement()); | 79 DCHECK(loader->GetElement()); |
| 80 if (loader->GetElement()->GetDocument().GetFrame() && | 80 if (loader->GetElement()->GetDocument().GetFrame() && |
| 81 loader->GetElement() | 81 loader->GetElement() |
| 82 ->GetDocument() | 82 ->GetDocument() |
| 83 .GetFrame() | 83 .GetFrame() |
| 84 ->Script() | 84 ->GetScriptController() |
| 85 .ShouldBypassMainWorldCSP()) | 85 .ShouldBypassMainWorldCSP()) |
| 86 return ImageLoader::kBypassMainWorldCSP; | 86 return ImageLoader::kBypassMainWorldCSP; |
| 87 return ImageLoader::kDoNotBypassMainWorldCSP; | 87 return ImageLoader::kDoNotBypassMainWorldCSP; |
| 88 } | 88 } |
| 89 | 89 |
| 90 class ImageLoader::Task { | 90 class ImageLoader::Task { |
| 91 public: | 91 public: |
| 92 static std::unique_ptr<Task> Create(ImageLoader* loader, | 92 static std::unique_ptr<Task> Create(ImageLoader* loader, |
| 93 UpdateFromElementBehavior update_behavior, | 93 UpdateFromElementBehavior update_behavior, |
| 94 ReferrerPolicy referrer_policy) { | 94 ReferrerPolicy referrer_policy) { |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 } | 637 } |
| 638 | 638 |
| 639 void ImageLoader::ElementDidMoveToNewDocument() { | 639 void ImageLoader::ElementDidMoveToNewDocument() { |
| 640 if (load_delay_counter_) | 640 if (load_delay_counter_) |
| 641 load_delay_counter_->DocumentChanged(element_->GetDocument()); | 641 load_delay_counter_->DocumentChanged(element_->GetDocument()); |
| 642 ClearFailedLoadURL(); | 642 ClearFailedLoadURL(); |
| 643 SetImage(0); | 643 SetImage(0); |
| 644 } | 644 } |
| 645 | 645 |
| 646 } // namespace blink | 646 } // namespace blink |
| OLD | NEW |