Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ | |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 class DownloadManager; | |
| 12 class ResourceDispatcherHost; | |
| 13 class TabContents; | |
| 14 | |
| 15 // Identifiers associated with the download by related subsystems. | |
| 16 // This class needs to be copyable, but has non-trivial methods. | |
|
Paweł Hajdan Jr.
2011/05/05 20:13:51
nit: Just remove the part about non-trivial method
ahendrickson
2011/05/06 16:16:50
Done.
| |
| 17 class DownloadProcessHandle { | |
| 18 public: | |
| 19 DownloadProcessHandle(); | |
| 20 DownloadProcessHandle(int child_id, int render_view_id, int request_id); | |
| 21 | |
| 22 void CancelDownload(ResourceDispatcherHost* rdh); | |
| 23 TabContents* GetTabContents(); | |
| 24 DownloadManager* GetDownloadManager(); | |
| 25 | |
| 26 int child_id() const { return child_id_; } | |
| 27 int render_view_id() const { return render_view_id_; } | |
| 28 int request_id() const { return request_id_; } | |
| 29 | |
| 30 private: | |
| 31 // The ID of the child process that started the download. | |
| 32 int child_id_; | |
|
Paweł Hajdan Jr.
2011/05/05 20:13:51
Could you make all member variables const?
ahendrickson
2011/05/06 16:16:50
That would prevent the class from being copyable.
Paweł Hajdan Jr.
2011/05/06 18:04:42
To be precise, I think it would prevent it from be
| |
| 33 | |
| 34 // The ID of the render view that started the download. | |
| 35 int render_view_id_; | |
| 36 | |
| 37 // The ID associated with the request used for the download. | |
| 38 int request_id_; | |
| 39 }; | |
| 40 | |
| 41 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ | |
| OLD | NEW |