OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // A ChromeView that implements one download on the Download shelf. | 5 // A ChromeView that implements one download on the Download shelf. |
6 // Each DownloadItemView contains an application icon, a text label | 6 // Each DownloadItemView contains an application icon, a text label |
7 // indicating the download's file name, a text label indicating the | 7 // indicating the download's file name, a text label indicating the |
8 // download's status (such as the number of bytes downloaded so far) | 8 // download's status (such as the number of bytes downloaded so far) |
9 // and a button for canceling an in progress download, or opening | 9 // and a button for canceling an in progress download, or opening |
10 // the completed download. | 10 // the completed download. |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "views/controls/button/button.h" | 31 #include "views/controls/button/button.h" |
32 #include "views/view.h" | 32 #include "views/view.h" |
33 | 33 |
34 namespace views { | 34 namespace views { |
35 class Label; | 35 class Label; |
36 class NativeButton; | 36 class NativeButton; |
37 } | 37 } |
38 class BaseDownloadItemModel; | 38 class BaseDownloadItemModel; |
39 class DownloadShelfView; | 39 class DownloadShelfView; |
40 class SkBitmap; | 40 class SkBitmap; |
| 41 class DownloadShelfContextMenuWin; |
41 | 42 |
42 class DownloadItemView : public views::ButtonListener, | 43 class DownloadItemView : public views::ButtonListener, |
43 public views::View, | 44 public views::View, |
44 public DownloadItem::Observer, | 45 public DownloadItem::Observer, |
45 public AnimationDelegate { | 46 public AnimationDelegate { |
46 public: | 47 public: |
47 DownloadItemView(DownloadItem* download, | 48 DownloadItemView(DownloadItem* download, |
48 DownloadShelfView* parent, | 49 DownloadShelfView* parent, |
49 BaseDownloadItemModel* model); | 50 BaseDownloadItemModel* model); |
50 virtual ~DownloadItemView(); | 51 virtual ~DownloadItemView(); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // Whether we are currently disabled as part of opening the downloaded file. | 238 // Whether we are currently disabled as part of opening the downloaded file. |
238 bool disabled_while_opening_; | 239 bool disabled_while_opening_; |
239 | 240 |
240 // The time at which this view was created. | 241 // The time at which this view was created. |
241 base::Time creation_time_; | 242 base::Time creation_time_; |
242 | 243 |
243 // Method factory used to delay reenabling of the item when opening the | 244 // Method factory used to delay reenabling of the item when opening the |
244 // downloaded file. | 245 // downloaded file. |
245 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_; | 246 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_; |
246 | 247 |
| 248 // The currently running download context menu. |
| 249 DownloadShelfContextMenuWin* active_menu_; |
| 250 |
247 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 251 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
248 }; | 252 }; |
249 | 253 |
250 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ | 254 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ |
OLD | NEW |