| 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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace ui { | 51 namespace ui { |
| 52 class ThemeProvider; | 52 class ThemeProvider; |
| 53 } | 53 } |
| 54 | 54 |
| 55 namespace views { | 55 namespace views { |
| 56 class ImageButton; | 56 class ImageButton; |
| 57 class Label; | 57 class Label; |
| 58 class LabelButton; | 58 class LabelButton; |
| 59 class MdTextButton; |
| 59 } | 60 } |
| 60 | 61 |
| 61 // Represents a single download item on the download shelf. Encompasses an icon, | 62 // Represents a single download item on the download shelf. Encompasses an icon, |
| 62 // text, malicious download warnings, etc. | 63 // text, malicious download warnings, etc. |
| 63 class DownloadItemView : public views::InkDropHostView, | 64 class DownloadItemView : public views::InkDropHostView, |
| 64 public views::VectorIconButtonDelegate, | 65 public views::VectorIconButtonDelegate, |
| 65 public views::ContextMenuController, | 66 public views::ContextMenuController, |
| 66 public content::DownloadItem::Observer, | 67 public content::DownloadItem::Observer, |
| 67 public gfx::AnimationDelegate { | 68 public gfx::AnimationDelegate { |
| 68 public: | 69 public: |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // A model class to control the status text we display. | 276 // A model class to control the status text we display. |
| 276 DownloadItemModel model_; | 277 DownloadItemModel model_; |
| 277 | 278 |
| 278 // Animation for download complete. | 279 // Animation for download complete. |
| 279 std::unique_ptr<gfx::SlideAnimation> complete_animation_; | 280 std::unique_ptr<gfx::SlideAnimation> complete_animation_; |
| 280 | 281 |
| 281 // Progress animation | 282 // Progress animation |
| 282 base::RepeatingTimer progress_timer_; | 283 base::RepeatingTimer progress_timer_; |
| 283 | 284 |
| 284 // Dangerous mode buttons. | 285 // Dangerous mode buttons. |
| 285 views::LabelButton* save_button_; | 286 views::MdTextButton* save_button_; |
| 286 views::LabelButton* discard_button_; | 287 views::MdTextButton* discard_button_; |
| 287 | 288 |
| 288 // The drop down button. | 289 // The drop down button. |
| 289 DropDownButton* dropdown_button_; | 290 DropDownButton* dropdown_button_; |
| 290 | 291 |
| 291 // Dangerous mode label. | 292 // Dangerous mode label. |
| 292 views::Label* dangerous_download_label_; | 293 views::Label* dangerous_download_label_; |
| 293 | 294 |
| 294 // Whether the dangerous mode label has been sized yet. | 295 // Whether the dangerous mode label has been sized yet. |
| 295 bool dangerous_download_label_sized_; | 296 bool dangerous_download_label_sized_; |
| 296 | 297 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 319 std::unique_ptr<extensions::ExperienceSamplingEvent> sampling_event_; | 320 std::unique_ptr<extensions::ExperienceSamplingEvent> sampling_event_; |
| 320 | 321 |
| 321 // Method factory used to delay reenabling of the item when opening the | 322 // Method factory used to delay reenabling of the item when opening the |
| 322 // downloaded file. | 323 // downloaded file. |
| 323 base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_; | 324 base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_; |
| 324 | 325 |
| 325 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 326 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
| 326 }; | 327 }; |
| 327 | 328 |
| 328 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H_ | 329 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H_ |
| OLD | NEW |