Chromium Code Reviews| Index: chrome/browser/download/download_process_handle.h |
| diff --git a/chrome/browser/download/download_process_handle.h b/chrome/browser/download/download_process_handle.h |
| index b722d61be39cd7db82b35d7756242551ca8ed708..d3f645e90ef7a1a07824d38f32fac7b5dc075922 100644 |
| --- a/chrome/browser/download/download_process_handle.h |
| +++ b/chrome/browser/download/download_process_handle.h |
| @@ -6,6 +6,8 @@ |
| #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ |
| #pragma once |
| +#include <string> |
| + |
| class DownloadManager; |
| class ResourceDispatcherHost; |
| class TabContents; |
| @@ -18,17 +20,41 @@ class TabContents; |
| class DownloadProcessHandle { |
| public: |
| DownloadProcessHandle(); |
| - DownloadProcessHandle(int child_id, int render_view_id, int request_id); |
| + DownloadProcessHandle(ResourceDispatcherHost* rdh, |
| + int child_id, |
| + int render_view_id, |
| + int request_id); |
| // These functions must be called on the UI thread. |
| TabContents* GetTabContents(); |
| DownloadManager* GetDownloadManager(); |
| - int child_id() const { return child_id_; } |
| - int render_view_id() const { return render_view_id_; } |
| - int request_id() const { return request_id_; } |
| + // Pause or resume (|pause| == false) the matching URL request. |
| + // If the DownloadProcessHandle was constructed with a null |
|
Paweł Hajdan Jr.
2011/06/04 08:58:51
I'm worried about this possibly silent no-op. Is |
Randy Smith (Not in Mondays)
2011/06/07 22:41:11
Hmmm. The silent no-op is copied from the downloa
|
| + // ResourceDispatcherHost, this is a no-op. |
| + void PauseRequest(bool pause); |
| + |
| + // Cancel the request |
| + void CancelRequest(); |
| + |
| + std::string DebugString() const; |
| private: |
| + // IO Thread indirections to resource dispatcher host. |
| + // Provided as targets for PostTask from within this object |
| + // only. Safe to use as ResourceDispatcherHost outlives the |
| + // IO thread. |
| + static void RDHPauseRequest(ResourceDispatcherHost* rdh, |
| + int process_unique_id, |
| + int request_id, |
| + bool pause); |
| + static void RDHCancelRequest(ResourceDispatcherHost* rdh, |
| + int process_unique_id, |
| + int request_id); |
| + |
| + // The resource dispatcher host. |
| + ResourceDispatcherHost* rdh_; |
|
hendrickson_a
2011/06/04 16:01:45
Nit: It seems unintuitive from the name of the cla
Randy Smith (Not in Mondays)
2011/06/07 22:41:11
Yep. I think of that as being part of the encpasu
|
| + |
| // The ID of the child process that started the download. |
| int child_id_; |