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

Side by Side Diff: webkit/glue/resource_loader_bridge.h

Issue 12321055: Revert 183382 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1418/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/glue/resource_loader_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The intent of this file is to provide a type-neutral abstraction between 5 // The intent of this file is to provide a type-neutral abstraction between
6 // Chrome and WebKit for resource loading. This pure-virtual interface is 6 // Chrome and WebKit for resource loading. This pure-virtual interface is
7 // implemented by the embedder. 7 // implemented by the embedder.
8 // 8 //
9 // One of these objects will be created by WebKit for each request. WebKit 9 // One of these objects will be created by WebKit for each request. WebKit
10 // will own the pointer to the bridge, and will delete it when the request is 10 // will own the pointer to the bridge, and will delete it when the request is
(...skipping 12 matching lines...) Expand all
23 #if defined(OS_POSIX) 23 #if defined(OS_POSIX)
24 #include "base/file_descriptor_posix.h" 24 #include "base/file_descriptor_posix.h"
25 #endif 25 #endif
26 #include "base/file_path.h" 26 #include "base/file_path.h"
27 #include "base/memory/ref_counted.h" 27 #include "base/memory/ref_counted.h"
28 #include "base/platform_file.h" 28 #include "base/platform_file.h"
29 #include "base/time.h" 29 #include "base/time.h"
30 #include "base/values.h" 30 #include "base/values.h"
31 #include "googleurl/src/gurl.h" 31 #include "googleurl/src/gurl.h"
32 #include "net/base/host_port_pair.h" 32 #include "net/base/host_port_pair.h"
33 #include "net/base/request_priority.h"
34 #include "net/url_request/url_request_status.h" 33 #include "net/url_request/url_request_status.h"
35 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h " 34 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h "
36 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" 35 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
37 #include "webkit/glue/resource_type.h" 36 #include "webkit/glue/resource_type.h"
38 #include "webkit/glue/webkit_glue_export.h" 37 #include "webkit/glue/webkit_glue_export.h"
39 38
40 namespace net { 39 namespace net {
41 class HttpResponseHeaders; 40 class HttpResponseHeaders;
42 } 41 }
43 42
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 int load_flags; 240 int load_flags;
242 241
243 // Process id of the process making the request. 242 // Process id of the process making the request.
244 int requestor_pid; 243 int requestor_pid;
245 244
246 // Indicates if the current request is the main frame load, a sub-frame 245 // Indicates if the current request is the main frame load, a sub-frame
247 // load, or a sub objects load. 246 // load, or a sub objects load.
248 ResourceType::Type request_type; 247 ResourceType::Type request_type;
249 248
250 // Indicates the priority of this request, as determined by WebKit. 249 // Indicates the priority of this request, as determined by WebKit.
251 net::RequestPriority priority; 250 WebKit::WebURLRequest::Priority priority;
252 251
253 // Used for plugin to browser requests. 252 // Used for plugin to browser requests.
254 uint32 request_context; 253 uint32 request_context;
255 254
256 // Identifies what appcache host this request is associated with. 255 // Identifies what appcache host this request is associated with.
257 int appcache_host_id; 256 int appcache_host_id;
258 257
259 // Used to associated the bridge with a frame's network context. 258 // Used to associated the bridge with a frame's network context.
260 int routing_id; 259 int routing_id;
261 260
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // Call this method to cancel a request that is in progress. This method 364 // Call this method to cancel a request that is in progress. This method
366 // causes the request to immediately transition into the 'done' state. The 365 // causes the request to immediately transition into the 'done' state. The
367 // OnCompletedRequest method will be called asynchronously; this assumes 366 // OnCompletedRequest method will be called asynchronously; this assumes
368 // the peer is still valid. 367 // the peer is still valid.
369 virtual void Cancel() = 0; 368 virtual void Cancel() = 0;
370 369
371 // Call this method to suspend or resume a load that is in progress. This 370 // Call this method to suspend or resume a load that is in progress. This
372 // method may only be called after a successful call to the Start method. 371 // method may only be called after a successful call to the Start method.
373 virtual void SetDefersLoading(bool value) = 0; 372 virtual void SetDefersLoading(bool value) = 0;
374 373
375 // Call this method when the priority of the requested resource changes after
376 // Start() has been called. This method may only be called after a successful
377 // call to the Start method.
378 virtual void DidChangePriority(net::RequestPriority new_priority) = 0;
379
380 // Call this method to load the resource synchronously (i.e., in one shot). 374 // Call this method to load the resource synchronously (i.e., in one shot).
381 // This is an alternative to the Start method. Be warned that this method 375 // This is an alternative to the Start method. Be warned that this method
382 // will block the calling thread until the resource is fully downloaded or an 376 // will block the calling thread until the resource is fully downloaded or an
383 // error occurs. It could block the calling thread for a long time, so only 377 // error occurs. It could block the calling thread for a long time, so only
384 // use this if you really need it! There is also no way for the caller to 378 // use this if you really need it! There is also no way for the caller to
385 // interrupt this method. Errors are reported via the status field of the 379 // interrupt this method. Errors are reported via the status field of the
386 // response parameter. 380 // response parameter.
387 virtual void SyncLoad(SyncLoadResponse* response) = 0; 381 virtual void SyncLoad(SyncLoadResponse* response) = 0;
388 382
389 protected: 383 protected:
390 // Construction must go through 384 // Construction must go through
391 // WebKitPlatformSupportImpl::CreateResourceLoader() 385 // WebKitPlatformSupportImpl::CreateResourceLoader()
392 // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload 386 // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload
393 // methods may be called to construct the body of the request. 387 // methods may be called to construct the body of the request.
394 WEBKIT_GLUE_EXPORT ResourceLoaderBridge(); 388 WEBKIT_GLUE_EXPORT ResourceLoaderBridge();
395 389
396 private: 390 private:
397 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); 391 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge);
398 }; 392 };
399 393
400 } // namespace webkit_glue 394 } // namespace webkit_glue
401 395
402 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ 396 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/glue/resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698