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

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

Issue 863113004: Make WebThreadedDataReceiver wrap a Blink-managed object instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix msvc compilation Created 5 years, 11 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 24 matching lines...) Expand all
35 #include "public/platform/WebURLLoaderClient.h" 35 #include "public/platform/WebURLLoaderClient.h"
36 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
37 #include "wtf/RefCounted.h" 37 #include "wtf/RefCounted.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class Resource; 41 class Resource;
42 class KURL; 42 class KURL;
43 class ResourceError; 43 class ResourceError;
44 class ResourceLoaderHost; 44 class ResourceLoaderHost;
45 class ThreadedDataReceiver;
45 46
46 class ResourceLoader final : public RefCountedWillBeGarbageCollectedFinalized<Re sourceLoader>, protected WebURLLoaderClient { 47 class ResourceLoader final : public RefCountedWillBeGarbageCollectedFinalized<Re sourceLoader>, protected WebURLLoaderClient {
47 public: 48 public:
48 static PassRefPtrWillBeRawPtr<ResourceLoader> create(ResourceLoaderHost*, Re source*, const ResourceRequest&, const ResourceLoaderOptions&); 49 static PassRefPtrWillBeRawPtr<ResourceLoader> create(ResourceLoaderHost*, Re source*, const ResourceRequest&, const ResourceLoaderOptions&);
49 virtual ~ResourceLoader(); 50 virtual ~ResourceLoader();
50 void trace(Visitor*); 51 void trace(Visitor*);
51 52
52 void start(); 53 void start();
53 void changeToSynchronous(); 54 void changeToSynchronous();
54 55
55 void cancel(); 56 void cancel();
56 void cancel(const ResourceError&); 57 void cancel(const ResourceError&);
57 void cancelIfNotFinishing(); 58 void cancelIfNotFinishing();
58 59
59 Resource* cachedResource() { return m_resource; } 60 Resource* cachedResource() { return m_resource; }
60 const ResourceRequest& originalRequest() const { return m_originalRequest; } 61 const ResourceRequest& originalRequest() const { return m_originalRequest; }
61 62
62 void setDefersLoading(bool); 63 void setDefersLoading(bool);
63 bool defersLoading() const { return m_defersLoading; } 64 bool defersLoading() const { return m_defersLoading; }
64 65
65 void attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDataReceiver>); 66 void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataReceiver> );
66 67
67 void releaseResources(); 68 void releaseResources();
68 69
69 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); 70 void didChangePriority(ResourceLoadPriority, int intraPriorityValue);
70 71
71 // WebURLLoaderClient 72 // WebURLLoaderClient
72 void willSendRequest(blink::WebURLLoader*, blink::WebURLRequest&, const blin k::WebURLResponse& redirectResponse) override; 73 void willSendRequest(blink::WebURLLoader*, blink::WebURLRequest&, const blin k::WebURLResponse& redirectResponse) override;
73 void didSendData(blink::WebURLLoader*, unsigned long long bytesSent, unsigne d long long totalBytesToBeSent) override; 74 void didSendData(blink::WebURLLoader*, unsigned long long bytesSent, unsigne d long long totalBytesToBeSent) override;
74 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&) override; 75 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&) override;
75 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&, WebDataConsumerHandle*) override; 76 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&, WebDataConsumerHandle*) override;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 ResourceLoaderState m_state; 131 ResourceLoaderState m_state;
131 132
132 // Used for sanity checking to make sure we don't experience illegal state 133 // Used for sanity checking to make sure we don't experience illegal state
133 // transitions. 134 // transitions.
134 ConnectionState m_connectionState; 135 ConnectionState m_connectionState;
135 }; 136 };
136 137
137 } 138 }
138 139
139 #endif 140 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698