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

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

Issue 12243002: Pass WebKit priority changes and parsing messages up to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // 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
365 // causes the request to immediately transition into the 'done' state. The 365 // causes the request to immediately transition into the 'done' state. The
366 // OnCompletedRequest method will be called asynchronously; this assumes 366 // OnCompletedRequest method will be called asynchronously; this assumes
367 // the peer is still valid. 367 // the peer is still valid.
368 virtual void Cancel() = 0; 368 virtual void Cancel() = 0;
369 369
370 // 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
371 // 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.
372 virtual void SetDefersLoading(bool value) = 0; 372 virtual void SetDefersLoading(bool value) = 0;
373 373
374 // Call this method when the priority of the requested resource changes after
375 // Start() has been called. This method may only be called after a successful
376 // call to the Start method.
377 virtual void DidChangePriority(
378 WebKit::WebURLRequest::Priority new_priority) = 0;
379
374 // Call this method to load the resource synchronously (i.e., in one shot). 380 // Call this method to load the resource synchronously (i.e., in one shot).
375 // This is an alternative to the Start method. Be warned that this method 381 // This is an alternative to the Start method. Be warned that this method
376 // will block the calling thread until the resource is fully downloaded or an 382 // will block the calling thread until the resource is fully downloaded or an
377 // error occurs. It could block the calling thread for a long time, so only 383 // error occurs. It could block the calling thread for a long time, so only
378 // use this if you really need it! There is also no way for the caller to 384 // use this if you really need it! There is also no way for the caller to
379 // interrupt this method. Errors are reported via the status field of the 385 // interrupt this method. Errors are reported via the status field of the
380 // response parameter. 386 // response parameter.
381 virtual void SyncLoad(SyncLoadResponse* response) = 0; 387 virtual void SyncLoad(SyncLoadResponse* response) = 0;
382 388
383 protected: 389 protected:
384 // Construction must go through 390 // Construction must go through
385 // WebKitPlatformSupportImpl::CreateResourceLoader() 391 // WebKitPlatformSupportImpl::CreateResourceLoader()
386 // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload 392 // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload
387 // methods may be called to construct the body of the request. 393 // methods may be called to construct the body of the request.
388 WEBKIT_GLUE_EXPORT ResourceLoaderBridge(); 394 WEBKIT_GLUE_EXPORT ResourceLoaderBridge();
389 395
390 private: 396 private:
391 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); 397 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge);
392 }; 398 };
393 399
394 } // namespace webkit_glue 400 } // namespace webkit_glue
395 401
396 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ 402 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698