| 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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Note that |rdh| is required to be non-null. | 30 // Note that |rdh| is required to be non-null. |
| 31 DownloadRequestHandle(ResourceDispatcherHost* rdh, | 31 DownloadRequestHandle(ResourceDispatcherHost* rdh, |
| 32 int child_id, | 32 int child_id, |
| 33 int render_view_id, | 33 int render_view_id, |
| 34 int request_id); | 34 int request_id); |
| 35 | 35 |
| 36 // These functions must be called on the UI thread. | 36 // These functions must be called on the UI thread. |
| 37 TabContents* GetTabContents() const; | 37 TabContents* GetTabContents() const; |
| 38 DownloadManager* GetDownloadManager() const; | 38 DownloadManager* GetDownloadManager() const; |
| 39 | 39 |
| 40 // Pause or resume the matching URL request. | 40 // Pause or resume the matching URL request. Note that while these |
| 41 // do not modify the DownloadRequestHandle, they do modify the |
| 42 // request the handle refers to. |
| 41 void PauseRequest() const; | 43 void PauseRequest() const; |
| 42 void ResumeRequest() const; | 44 void ResumeRequest() const; |
| 43 | 45 |
| 44 // Cancel the request | 46 // Cancel the request. Note that while this does not |
| 47 // modify the DownloadRequestHandle, it does modify the |
| 48 // request the handle refers to. |
| 45 void CancelRequest() const; | 49 void CancelRequest() const; |
| 46 | 50 |
| 47 std::string DebugString() const; | 51 std::string DebugString() const; |
| 48 | 52 |
| 49 private: | 53 private: |
| 50 // The resource dispatcher host. | 54 // The resource dispatcher host. |
| 51 ResourceDispatcherHost* rdh_; | 55 ResourceDispatcherHost* rdh_; |
| 52 | 56 |
| 53 // The ID of the child process that started the download. | 57 // The ID of the child process that started the download. |
| 54 int child_id_; | 58 int child_id_; |
| 55 | 59 |
| 56 // The ID of the render view that started the download. | 60 // The ID of the render view that started the download. |
| 57 int render_view_id_; | 61 int render_view_id_; |
| 58 | 62 |
| 59 // The ID associated with the request used for the download. | 63 // The ID associated with the request used for the download. |
| 60 int request_id_; | 64 int request_id_; |
| 61 }; | 65 }; |
| 62 | 66 |
| 63 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ | 67 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ |
| OLD | NEW |