| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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, which also provides a factory method Create | 7 // implemented by the embedder, which also provides a factory method Create |
| 8 // to instantiate this object. | 8 // to instantiate this object. |
| 9 // | 9 // |
| 10 // One of these objects will be created by WebKit for each request. WebKit | 10 // One of these objects will be created by WebKit for each request. WebKit |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 // Call this method to load the resource synchronously (i.e., in one shot). | 383 // Call this method to load the resource synchronously (i.e., in one shot). |
| 384 // This is an alternative to the Start method. Be warned that this method | 384 // This is an alternative to the Start method. Be warned that this method |
| 385 // will block the calling thread until the resource is fully downloaded or an | 385 // will block the calling thread until the resource is fully downloaded or an |
| 386 // error occurs. It could block the calling thread for a long time, so only | 386 // error occurs. It could block the calling thread for a long time, so only |
| 387 // use this if you really need it! There is also no way for the caller to | 387 // use this if you really need it! There is also no way for the caller to |
| 388 // interrupt this method. Errors are reported via the status field of the | 388 // interrupt this method. Errors are reported via the status field of the |
| 389 // response parameter. | 389 // response parameter. |
| 390 virtual void SyncLoad(SyncLoadResponse* response) = 0; | 390 virtual void SyncLoad(SyncLoadResponse* response) = 0; |
| 391 | 391 |
| 392 // When loader is transferred from one page to another, the IPC routing id | |
| 393 // can change (they are associated with pages). | |
| 394 virtual void UpdateRoutingId(int new_routing_id) = 0; | |
| 395 | |
| 396 protected: | 392 protected: |
| 397 // construction must go through Create() | 393 // construction must go through Create() |
| 398 ResourceLoaderBridge(); | 394 ResourceLoaderBridge(); |
| 399 | 395 |
| 400 private: | 396 private: |
| 401 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); | 397 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); |
| 402 }; | 398 }; |
| 403 | 399 |
| 404 } // namespace webkit_glue | 400 } // namespace webkit_glue |
| 405 | 401 |
| 406 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ | 402 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ |
| OLD | NEW |