| 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 14 matching lines...) Expand all Loading... |
| 25 // | 25 // |
| 26 // DownloadRequestHandleInterface is defined for mocking purposes. | 26 // DownloadRequestHandleInterface is defined for mocking purposes. |
| 27 class CONTENT_EXPORT DownloadRequestHandleInterface { | 27 class CONTENT_EXPORT DownloadRequestHandleInterface { |
| 28 public: | 28 public: |
| 29 virtual ~DownloadRequestHandleInterface() {} | 29 virtual ~DownloadRequestHandleInterface() {} |
| 30 | 30 |
| 31 // These functions must be called on the UI thread. | 31 // These functions must be called on the UI thread. |
| 32 virtual TabContents* GetTabContents() const = 0; | 32 virtual TabContents* GetTabContents() const = 0; |
| 33 virtual content::DownloadManager* GetDownloadManager() const = 0; | 33 virtual content::DownloadManager* GetDownloadManager() const = 0; |
| 34 | 34 |
| 35 // Pause or resume the matching URL request. | 35 // Pauses or resumes the matching URL request. |
| 36 virtual void PauseRequest() const = 0; | 36 virtual void PauseRequest() const = 0; |
| 37 virtual void ResumeRequest() const = 0; | 37 virtual void ResumeRequest() const = 0; |
| 38 | 38 |
| 39 // Cancel the request. | 39 // Cancels the request. |
| 40 virtual void CancelRequest() const = 0; | 40 virtual void CancelRequest() const = 0; |
| 41 | 41 |
| 42 // Describe the object. | 42 // Describe the object. |
| 43 virtual std::string DebugString() const = 0; | 43 virtual std::string DebugString() const = 0; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 | 46 |
| 47 class CONTENT_EXPORT DownloadRequestHandle | 47 class CONTENT_EXPORT DownloadRequestHandle |
| 48 : public DownloadRequestHandleInterface { | 48 : public DownloadRequestHandleInterface { |
| 49 public: | 49 public: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 78 int child_id_; | 78 int child_id_; |
| 79 | 79 |
| 80 // The ID of the render view that started the download. | 80 // The ID of the render view that started the download. |
| 81 int render_view_id_; | 81 int render_view_id_; |
| 82 | 82 |
| 83 // The ID associated with the request used for the download. | 83 // The ID associated with the request used for the download. |
| 84 int request_id_; | 84 int request_id_; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ | 87 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ |
| OLD | NEW |