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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.h

Issue 1889973002: Refactoring starting a resource load (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 23 matching lines...) Expand all
34 #include "platform/network/ResourceRequest.h" 34 #include "platform/network/ResourceRequest.h"
35 #include "public/platform/WebURLLoader.h" 35 #include "public/platform/WebURLLoader.h"
36 #include "public/platform/WebURLLoaderClient.h" 36 #include "public/platform/WebURLLoaderClient.h"
37 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class Resource; 41 class Resource;
42 class ResourceError; 42 class ResourceError;
43 class ResourceFetcher; 43 class ResourceFetcher;
44 class WebLoadingTaskRunner;
hiroshige 2016/04/21 08:27:40 Where is this forward daclaration used?
Nate Chapin 2016/05/18 23:56:04 Oops, I don't know what happened there, removed.
44 45
45 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour ceLoader>, protected WebURLLoaderClient { 46 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour ceLoader>, protected WebURLLoaderClient {
46 public: 47 public:
47 static ResourceLoader* create(ResourceFetcher*, Resource*); 48 static ResourceLoader* create(ResourceFetcher*, Resource*);
48 ~ResourceLoader() override; 49 ~ResourceLoader() override;
49 DECLARE_TRACE(); 50 DECLARE_TRACE();
50 51
51 // Promptly release m_loader. 52 // Promptly release m_loader.
52 EAGERLY_FINALIZE(); 53 EAGERLY_FINALIZE();
53 54
54 void start(ResourceRequest&); 55 void start(ResourceRequest&, WebTaskRunner* loadingTaskRunner, bool defersLo ading);
55 56
56 void cancel(); 57 void cancel();
57 void cancel(const ResourceError&); 58 void cancel(const ResourceError&);
58 void cancelIfNotFinishing(); 59 void cancelIfNotFinishing();
59 60
60 Resource* cachedResource() { return m_resource.get(); } 61 Resource* cachedResource() { return m_resource.get(); }
61 62
62 void setDefersLoading(bool); 63 void setDefersLoading(bool);
63 64
64 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); 65 void didChangePriority(ResourceLoadPriority, int intraPriorityValue);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 Member<Resource> m_resource; 109 Member<Resource> m_resource;
109 110
110 // Used for sanity checking to make sure we don't experience illegal state 111 // Used for sanity checking to make sure we don't experience illegal state
111 // transitions. 112 // transitions.
112 ConnectionState m_state; 113 ConnectionState m_state;
113 }; 114 };
114 115
115 } // namespace blink 116 } // namespace blink
116 117
117 #endif 118 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698