OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 view that implements one download on the Download shelf. | 5 // A view that implements one download on the Download shelf. |
6 // Each DownloadItemViewMd contains an application icon, a text label | 6 // Each DownloadItemViewMd 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 class SlideAnimation; | 48 class SlideAnimation; |
49 } | 49 } |
50 | 50 |
51 namespace views { | 51 namespace views { |
52 class ImageButton; | 52 class ImageButton; |
53 class Label; | 53 class Label; |
54 class LabelButton; | 54 class LabelButton; |
55 } | 55 } |
56 | 56 |
57 // The DownloadItemView in MD style. This is copied from DownloadItemView, | 57 // The DownloadItemView in MD style. This is copied from DownloadItemView, |
58 // which it should eventually replace. TODO(estade): crop out all the | 58 // which it should eventually replace. |
59 // unnecessary bits like the body image sets. | |
60 class DownloadItemViewMd : public views::ButtonListener, | 59 class DownloadItemViewMd : public views::ButtonListener, |
61 public views::View, | 60 public views::View, |
62 public views::ContextMenuController, | 61 public views::ContextMenuController, |
63 public content::DownloadItem::Observer, | 62 public content::DownloadItem::Observer, |
64 public gfx::AnimationDelegate { | 63 public gfx::AnimationDelegate { |
65 public: | 64 public: |
66 DownloadItemViewMd(content::DownloadItem* download, | 65 DownloadItemViewMd(content::DownloadItem* download, |
67 DownloadShelfView* parent); | 66 DownloadShelfView* parent); |
68 ~DownloadItemViewMd() override; | 67 ~DownloadItemViewMd() override; |
69 | 68 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; | 299 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; |
301 | 300 |
302 // Method factory used to delay reenabling of the item when opening the | 301 // Method factory used to delay reenabling of the item when opening the |
303 // downloaded file. | 302 // downloaded file. |
304 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_; | 303 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_; |
305 | 304 |
306 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd); | 305 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd); |
307 }; | 306 }; |
308 | 307 |
309 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ | 308 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ |
OLD | NEW |