Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/WebKit/Source/core/loader/ImageLoader.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 .shouldBypassMainWorldCSP()) 84 .shouldBypassMainWorldCSP())
85 return ImageLoader::BypassMainWorldCSP; 85 return ImageLoader::BypassMainWorldCSP;
86 return ImageLoader::DoNotBypassMainWorldCSP; 86 return ImageLoader::DoNotBypassMainWorldCSP;
87 } 87 }
88 88
89 class ImageLoader::Task { 89 class ImageLoader::Task {
90 public: 90 public:
91 static std::unique_ptr<Task> create(ImageLoader* loader, 91 static std::unique_ptr<Task> create(ImageLoader* loader,
92 UpdateFromElementBehavior updateBehavior, 92 UpdateFromElementBehavior updateBehavior,
93 ReferrerPolicy referrerPolicy) { 93 ReferrerPolicy referrerPolicy) {
94 return makeUnique<Task>(loader, updateBehavior, referrerPolicy); 94 return WTF::makeUnique<Task>(loader, updateBehavior, referrerPolicy);
95 } 95 }
96 96
97 Task(ImageLoader* loader, 97 Task(ImageLoader* loader,
98 UpdateFromElementBehavior updateBehavior, 98 UpdateFromElementBehavior updateBehavior,
99 ReferrerPolicy referrerPolicy) 99 ReferrerPolicy referrerPolicy)
100 : m_loader(loader), 100 : m_loader(loader),
101 m_shouldBypassMainWorldCSP(shouldBypassMainWorldCSP(loader)), 101 m_shouldBypassMainWorldCSP(shouldBypassMainWorldCSP(loader)),
102 m_updateBehavior(updateBehavior), 102 m_updateBehavior(updateBehavior),
103 m_weakFactory(this), 103 m_weakFactory(this),
104 m_referrerPolicy(referrerPolicy) { 104 m_referrerPolicy(referrerPolicy) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 inline void ImageLoader::clearFailedLoadURL() { 254 inline void ImageLoader::clearFailedLoadURL() {
255 m_failedLoadURL = AtomicString(); 255 m_failedLoadURL = AtomicString();
256 } 256 }
257 257
258 inline void ImageLoader::enqueueImageLoadingMicroTask( 258 inline void ImageLoader::enqueueImageLoadingMicroTask(
259 UpdateFromElementBehavior updateBehavior, 259 UpdateFromElementBehavior updateBehavior,
260 ReferrerPolicy referrerPolicy) { 260 ReferrerPolicy referrerPolicy) {
261 std::unique_ptr<Task> task = 261 std::unique_ptr<Task> task =
262 Task::create(this, updateBehavior, referrerPolicy); 262 Task::create(this, updateBehavior, referrerPolicy);
263 m_pendingTask = task->createWeakPtr(); 263 m_pendingTask = task->createWeakPtr();
264 Microtask::enqueueMicrotask(WTF::bind(&Task::run, passed(std::move(task)))); 264 Microtask::enqueueMicrotask(
265 WTF::bind(&Task::run, WTF::passed(std::move(task))));
265 m_loadDelayCounter = 266 m_loadDelayCounter =
266 IncrementLoadEventDelayCount::create(m_element->document()); 267 IncrementLoadEventDelayCount::create(m_element->document());
267 } 268 }
268 269
269 void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, 270 void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior,
270 UpdateFromElementBehavior updateBehavior, 271 UpdateFromElementBehavior updateBehavior,
271 const KURL& url, 272 const KURL& url,
272 ReferrerPolicy referrerPolicy) { 273 ReferrerPolicy referrerPolicy) {
273 // FIXME: According to 274 // FIXME: According to
274 // http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-conten t.html#the-img-element:the-img-element-55 275 // http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-conten t.html#the-img-element:the-img-element-55
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } 634 }
634 635
635 void ImageLoader::elementDidMoveToNewDocument() { 636 void ImageLoader::elementDidMoveToNewDocument() {
636 if (m_loadDelayCounter) 637 if (m_loadDelayCounter)
637 m_loadDelayCounter->documentChanged(m_element->document()); 638 m_loadDelayCounter->documentChanged(m_element->document());
638 clearFailedLoadURL(); 639 clearFailedLoadURL();
639 setImage(0); 640 setImage(0);
640 } 641 }
641 642
642 } // namespace blink 643 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.cpp ('k') | third_party/WebKit/Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698