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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view.h

Issue 2439873002: Make all text buttons on download shelf work well with themes, not just (Closed)
Patch Set: dont set bg Created 4 years, 2 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 | « no previous file | chrome/browser/ui/views/download/download_item_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/download/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698