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

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: Added comments. 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 class DownloadManager;
10 class ResourceDispatcherHost;
11 class TabContents;
12
13 // A handle used by the download system for operations on external
14 // objects associated with the download (e.g. URLRequest, TabContents,
15 // DownloadManager).
16 // This class needs to be copyable, so we can pass it across threads and not
17 // worry about lifetime or const-ness.
18 class DownloadProcessHandle {
19 public:
20 DownloadProcessHandle();
21 DownloadProcessHandle(int child_id, int render_view_id, int request_id);
22
23 // These functions must be called on the UI thread.
24 TabContents* GetTabContents();
25 DownloadManager* GetDownloadManager();
26
27 int child_id() const { return child_id_; }
28 int render_view_id() const { return render_view_id_; }
29 int request_id() const { return request_id_; }
30
31 private:
32 // The ID of the child process that started the download.
33 int child_id_;
34
35 // The ID of the render view that started the download.
36 int render_view_id_;
37
38 // The ID associated with the request used for the download.
39 int request_id_;
40 };
41
42 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PROCESS_HANDLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_process_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698