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

Side by Side Diff: Source/core/loader/DocumentThreadableLoader.cpp

Issue 1303153005: Introduce WebTaskRunner Patch 3/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing #include Created 5 years, 3 months 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
« no previous file with comments | « Source/core/html/parser/HTMLParserThread.cpp ('k') | Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 namespace blink { 60 namespace blink {
61 61
62 namespace { 62 namespace {
63 63
64 class EmptyDataHandle final : public WebDataConsumerHandle { 64 class EmptyDataHandle final : public WebDataConsumerHandle {
65 private: 65 private:
66 class EmptyDataReader final : public WebDataConsumerHandle::Reader { 66 class EmptyDataReader final : public WebDataConsumerHandle::Reader {
67 public: 67 public:
68 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact ory(this) 68 explicit EmptyDataReader(WebDataConsumerHandle::Client* client) : m_fact ory(this)
69 { 69 {
70 Platform::current()->currentThread()->postTask(FROM_HERE, new Task(b ind(&EmptyDataReader::notify, m_factory.createWeakPtr(), client))); 70 Platform::current()->currentThread()->taskRunner()->postTask(FROM_HE RE, new Task(bind(&EmptyDataReader::notify, m_factory.createWeakPtr(), client))) ;
71 } 71 }
72 private: 72 private:
73 Result read(void*, size_t, WebDataConsumerHandle::Flags, size_t *readSiz e) override 73 Result read(void*, size_t, WebDataConsumerHandle::Flags, size_t *readSiz e) override
74 { 74 {
75 *readSize = 0; 75 *readSize = 0;
76 return Done; 76 return Done;
77 } 77 }
78 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size _t *available) override 78 Result beginRead(const void** buffer, WebDataConsumerHandle::Flags, size _t *available) override
79 { 79 {
80 *available = 0; 80 *available = 0;
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 return DoNotAllowStoredCredentials; 751 return DoNotAllowStoredCredentials;
752 return m_resourceLoaderOptions.allowCredentials; 752 return m_resourceLoaderOptions.allowCredentials;
753 } 753 }
754 754
755 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const 755 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const
756 { 756 {
757 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin (); 757 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin ();
758 } 758 }
759 759
760 } // namespace blink 760 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLParserThread.cpp ('k') | Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698