Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: chrome/browser/download/download_process_handle.h

Issue 6932046: Added DownloadProcessHandle class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed code extraneous to this CL. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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.
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.
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_; }
Randy Smith (Not in Mondays) 2011/05/05 20:25:34 I'd like to look closely at all places where these
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_;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698