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 reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv
ed. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 static ImageLoader::BypassMainWorldBehavior shouldBypassMainWorldCSP(ImageLoader
* loader) | 72 static ImageLoader::BypassMainWorldBehavior shouldBypassMainWorldCSP(ImageLoader
* loader) |
73 { | 73 { |
74 ASSERT(loader); | 74 ASSERT(loader); |
75 ASSERT(loader->element()); | 75 ASSERT(loader->element()); |
76 if (loader->element()->document().frame() && loader->element()->document().f
rame()->script().shouldBypassMainWorldCSP()) | 76 if (loader->element()->document().frame() && loader->element()->document().f
rame()->script().shouldBypassMainWorldCSP()) |
77 return ImageLoader::BypassMainWorldCSP; | 77 return ImageLoader::BypassMainWorldCSP; |
78 return ImageLoader::DoNotBypassMainWorldCSP; | 78 return ImageLoader::DoNotBypassMainWorldCSP; |
79 } | 79 } |
80 | 80 |
81 class ImageLoader::Task : public WebThread::Task { | 81 class ImageLoader::Task : public WebTaskRunner::Task { |
82 public: | 82 public: |
83 static PassOwnPtr<Task> create(ImageLoader* loader, UpdateFromElementBehavio
r updateBehavior, ReferrerPolicy referrerPolicy) | 83 static PassOwnPtr<Task> create(ImageLoader* loader, UpdateFromElementBehavio
r updateBehavior, ReferrerPolicy referrerPolicy) |
84 { | 84 { |
85 return adoptPtr(new Task(loader, updateBehavior, referrerPolicy)); | 85 return adoptPtr(new Task(loader, updateBehavior, referrerPolicy)); |
86 } | 86 } |
87 | 87 |
88 Task(ImageLoader* loader, UpdateFromElementBehavior updateBehavior, Referrer
Policy referrerPolicy) | 88 Task(ImageLoader* loader, UpdateFromElementBehavior updateBehavior, Referrer
Policy referrerPolicy) |
89 : m_loader(loader) | 89 : m_loader(loader) |
90 , m_shouldBypassMainWorldCSP(shouldBypassMainWorldCSP(loader)) | 90 , m_shouldBypassMainWorldCSP(shouldBypassMainWorldCSP(loader)) |
91 , m_updateBehavior(updateBehavior) | 91 , m_updateBehavior(updateBehavior) |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 | 674 |
675 void ImageLoader::sourceImageChanged() | 675 void ImageLoader::sourceImageChanged() |
676 { | 676 { |
677 for (auto& client : m_clients) { | 677 for (auto& client : m_clients) { |
678 ImageLoaderClient* handle = client; | 678 ImageLoaderClient* handle = client; |
679 handle->notifyImageSourceChanged(); | 679 handle->notifyImageSourceChanged(); |
680 } | 680 } |
681 } | 681 } |
682 | 682 |
683 } // namespace blink | 683 } // namespace blink |
OLD | NEW |