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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..998e6f3f0043d005d65930b01a569b68623b93eb |
| --- /dev/null |
| +++ b/chrome/browser/download/download_process_handle.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ |
| +#define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ |
| +#pragma once |
| + |
| +#include <string> |
| + |
| +class DownloadManager; |
| +class ResourceDispatcherHost; |
| +class TabContents; |
| + |
| +// Identifiers associated with the download by related subsystems. |
| +// This class needs to be copyable, but has non-trivial methods. |
|
Randy Smith (Not in Mondays)
2011/05/05 20:25:34
A word about why it needs to be copiable (easy eno
ahendrickson
2011/05/06 16:16:50
Done.
|
| +class DownloadProcessHandle { |
| + public: |
| + DownloadProcessHandle(); |
| + DownloadProcessHandle(int child_id, int render_view_id, int request_id); |
| + |
| + void CancelDownload(ResourceDispatcherHost* rdh); |
| + TabContents* GetTabContents(); |
| + DownloadManager* GetDownloadManager(); |
| + |
| + int child_id() const { return child_id_; } |
|
Randy Smith (Not in Mondays)
2011/05/05 20:25:34
I'd like to look closely at all places where these
|
| + int render_view_id() const { return render_view_id_; } |
| + int request_id() const { return request_id_; } |
| + |
| + private: |
| + // The ID of the child process that started the download. |
| + int child_id_; |
| + |
| + // The ID of the render view that started the download. |
| + int render_view_id_; |
| + |
| + // The ID associated with the request used for the download. |
| + int request_id_; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_ |