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

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

Issue 100563004: Redirect HTML resource bytes directly to parser thread (Blink side CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_decodermove
Patch Set: Created 6 years, 9 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 18 matching lines...) Expand all
29 #ifndef ResourceLoader_h 29 #ifndef ResourceLoader_h
30 #define ResourceLoader_h 30 #define ResourceLoader_h
31 31
32 #include "core/fetch/ResourceLoaderOptions.h" 32 #include "core/fetch/ResourceLoaderOptions.h"
33 #include "platform/network/ResourceRequest.h" 33 #include "platform/network/ResourceRequest.h"
34 #include "public/platform/WebURLLoader.h" 34 #include "public/platform/WebURLLoader.h"
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 {
40 class WebThreadedDataReceiver;
41 }
42
39 namespace WebCore { 43 namespace WebCore {
40 44
41 class Resource; 45 class Resource;
42 class KURL; 46 class KURL;
43 class ResourceError; 47 class ResourceError;
44 class ResourceResponse; 48 class ResourceResponse;
45 class ResourceLoaderHost; 49 class ResourceLoaderHost;
46 50
47 class ResourceLoader FINAL : public RefCounted<ResourceLoader>, protected blink: :WebURLLoaderClient { 51 class ResourceLoader FINAL : public RefCounted<ResourceLoader>, protected blink: :WebURLLoaderClient {
48 public: 52 public:
49 static PassRefPtr<ResourceLoader> create(ResourceLoaderHost*, Resource*, con st ResourceRequest&, const ResourceLoaderOptions&); 53 static PassRefPtr<ResourceLoader> create(ResourceLoaderHost*, Resource*, con st ResourceRequest&, const ResourceLoaderOptions&);
50 virtual ~ResourceLoader(); 54 virtual ~ResourceLoader();
51 55
52 void start(); 56 void start();
53 void changeToSynchronous(); 57 void changeToSynchronous();
54 58
55 void cancel(); 59 void cancel();
56 void cancel(const ResourceError&); 60 void cancel(const ResourceError&);
57 void cancelIfNotFinishing(); 61 void cancelIfNotFinishing();
58 62
59 Resource* cachedResource() { return m_resource; } 63 Resource* cachedResource() { return m_resource; }
60 const ResourceRequest& originalRequest() const { return m_originalRequest; } 64 const ResourceRequest& originalRequest() const { return m_originalRequest; }
61 65
62 void setDefersLoading(bool); 66 void setDefersLoading(bool);
63 bool defersLoading() const { return m_defersLoading; } 67 bool defersLoading() const { return m_defersLoading; }
64 68
69 void attachThreadedDataReceiver(blink::WebThreadedDataReceiver*);
70
65 void releaseResources(); 71 void releaseResources();
66 72
67 void didChangePriority(ResourceLoadPriority); 73 void didChangePriority(ResourceLoadPriority);
68 74
69 // WebURLLoaderClient 75 // WebURLLoaderClient
70 virtual void willSendRequest(blink::WebURLLoader*, blink::WebURLRequest&, co nst blink::WebURLResponse& redirectResponse) OVERRIDE; 76 virtual void willSendRequest(blink::WebURLLoader*, blink::WebURLRequest&, co nst blink::WebURLResponse& redirectResponse) OVERRIDE;
71 virtual void didSendData(blink::WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) OVERRIDE; 77 virtual void didSendData(blink::WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) OVERRIDE;
72 virtual void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLRes ponse&) OVERRIDE; 78 virtual void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLRes ponse&) OVERRIDE;
73 virtual void didReceiveData(blink::WebURLLoader*, const char*, int, int enco dedDataLength) OVERRIDE; 79 virtual void didReceiveData(blink::WebURLLoader*, const char*, int, int enco dedDataLength) OVERRIDE;
74 virtual void didReceiveCachedMetadata(blink::WebURLLoader*, const char* data , int length) OVERRIDE; 80 virtual void didReceiveCachedMetadata(blink::WebURLLoader*, const char* data , int length) OVERRIDE;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Used for sanity checking to make sure we don't experience illegal state 142 // Used for sanity checking to make sure we don't experience illegal state
137 // transitions. 143 // transitions.
138 ConnectionState m_connectionState; 144 ConnectionState m_connectionState;
139 145
140 OwnPtr<RequestCountTracker> m_requestCountTracker; 146 OwnPtr<RequestCountTracker> m_requestCountTracker;
141 }; 147 };
142 148
143 } 149 }
144 150
145 #endif 151 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/fetch/ResourceLoader.cpp » ('j') | Source/core/fetch/ResourceLoader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698