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

Side by Side Diff: content/public/browser/download_item.h

Issue 2320693003: [Download Home] Expose Java side to DownloadItem states (Closed)
Patch Set: Rebased Created 4 years, 3 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
« no previous file with comments | « content/public/android/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Each download is represented by a DownloadItem, and all DownloadItems 5 // Each download is represented by a DownloadItem, and all DownloadItems
6 // are owned by the DownloadManager which maintains a global list of all 6 // are owned by the DownloadManager which maintains a global list of all
7 // downloads. DownloadItems are created when a user initiates a download, 7 // downloads. DownloadItems are created when a user initiates a download,
8 // and exist for the duration of the browser life time. 8 // and exist for the duration of the browser life time.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class DownloadManager; 45 class DownloadManager;
46 class WebContents; 46 class WebContents;
47 47
48 // One DownloadItem per download. This is the model class that stores all the 48 // One DownloadItem per download. This is the model class that stores all the
49 // state for a download. Multiple views, such as a tab's download shelf and the 49 // state for a download. Multiple views, such as a tab's download shelf and the
50 // Destination tab's download view, may refer to a given DownloadItem. 50 // Destination tab's download view, may refer to a given DownloadItem.
51 // 51 //
52 // This is intended to be used only on the UI thread. 52 // This is intended to be used only on the UI thread.
53 class CONTENT_EXPORT DownloadItem : public base::SupportsUserData { 53 class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
54 public: 54 public:
55 // A Java counterpart will be generated for this enum.
56 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content_public.browser
55 enum DownloadState { 57 enum DownloadState {
56 // Download is actively progressing. 58 // Download is actively progressing.
57 IN_PROGRESS = 0, 59 IN_PROGRESS = 0,
58 60
59 // Download is completely finished. 61 // Download is completely finished.
60 COMPLETE, 62 COMPLETE,
61 63
62 // Download has been cancelled. 64 // Download has been cancelled.
63 CANCELLED, 65 CANCELLED,
64 66
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // return |name|. Has no effect on the final target filename. 338 // return |name|. Has no effect on the final target filename.
337 virtual void SetDisplayName(const base::FilePath& name) = 0; 339 virtual void SetDisplayName(const base::FilePath& name) = 0;
338 340
339 // Debug/testing ------------------------------------------------------------- 341 // Debug/testing -------------------------------------------------------------
340 virtual std::string DebugString(bool verbose) const = 0; 342 virtual std::string DebugString(bool verbose) const = 0;
341 }; 343 };
342 344
343 } // namespace content 345 } // namespace content
344 346
345 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ 347 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « content/public/android/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698