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

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

Issue 1538773002: Reduce CPU usage of download shelf UI. (both MD and pre-MD shelves) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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
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 // 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // A model class to control the status text we display. 300 // A model class to control the status text we display.
301 DownloadItemModel model_; 301 DownloadItemModel model_;
302 302
303 // Hover animations for our body and drop buttons. 303 // Hover animations for our body and drop buttons.
304 scoped_ptr<gfx::SlideAnimation> body_hover_animation_; 304 scoped_ptr<gfx::SlideAnimation> body_hover_animation_;
305 scoped_ptr<gfx::SlideAnimation> drop_hover_animation_; 305 scoped_ptr<gfx::SlideAnimation> drop_hover_animation_;
306 306
307 // Animation for download complete. 307 // Animation for download complete.
308 scoped_ptr<gfx::SlideAnimation> complete_animation_; 308 scoped_ptr<gfx::SlideAnimation> complete_animation_;
309 309
310 // Progress animation
311 base::RepeatingTimer progress_timer_;
312
313 // Dangerous mode buttons. 310 // Dangerous mode buttons.
314 views::LabelButton* save_button_; 311 views::LabelButton* save_button_;
315 views::LabelButton* discard_button_; 312 views::LabelButton* discard_button_;
316 313
317 // Dangerous mode label. 314 // Dangerous mode label.
318 views::Label* dangerous_download_label_; 315 views::Label* dangerous_download_label_;
319 316
320 // Whether the dangerous mode label has been sized yet. 317 // Whether the dangerous mode label has been sized yet.
321 bool dangerous_download_label_sized_; 318 bool dangerous_download_label_sized_;
322 319
(...skipping 25 matching lines...) Expand all
348 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; 345 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_;
349 346
350 // Method factory used to delay reenabling of the item when opening the 347 // Method factory used to delay reenabling of the item when opening the
351 // downloaded file. 348 // downloaded file.
352 base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_; 349 base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_;
353 350
354 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); 351 DISALLOW_COPY_AND_ASSIGN(DownloadItemView);
355 }; 352 };
356 353
357 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ 354 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698