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> | |
|
Paweł Hajdan Jr.
2011/05/06 18:04:42
nit: Why?
ahendrickson
2011/05/09 15:57:31
Removed.
| |
| 10 | |
| 11 class DownloadManager; | |
| 12 class ResourceDispatcherHost; | |
| 13 class TabContents; | |
| 14 | |
| 15 // A handle used by the download system for operations on external | |
| 16 // objects associated with the download (e.g. URLRequest, TabContents, | |
| 17 // DownloadManager). | |
| 18 // This class needs to be copyable, so we can pass it across threads and not | |
| 19 // worry about lifetime or const-ness. | |
| 20 class DownloadProcessHandle { | |
| 21 public: | |
| 22 DownloadProcessHandle(); | |
| 23 DownloadProcessHandle(int child_id, int render_view_id, int request_id); | |
| 24 | |
| 25 // These functions must be called on the UI thread. | |
| 26 TabContents* GetTabContents(); | |
| 27 DownloadManager* GetDownloadManager(); | |
| 28 | |
| 29 int child_id() const { return child_id_; } | |
| 30 int render_view_id() const { return render_view_id_; } | |
| 31 int request_id() const { return request_id_; } | |
| 32 | |
| 33 private: | |
| 34 // The ID of the child process that started the download. | |
| 35 int child_id_; | |
| 36 | |
| 37 // The ID of the render view that started the download. | |
| 38 int render_view_id_; | |
| 39 | |
| 40 // The ID associated with the request used for the download. | |
| 41 int request_id_; | |
| 42 }; | |
| 43 | |
| 44 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ | |
| OLD | NEW |