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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view_md.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 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // A model class to control the status text we display. 263 // A model class to control the status text we display.
264 DownloadItemModel model_; 264 DownloadItemModel model_;
265 265
266 // Hover animations for our body and drop buttons. 266 // Hover animations for our body and drop buttons.
267 scoped_ptr<gfx::SlideAnimation> body_hover_animation_; 267 scoped_ptr<gfx::SlideAnimation> body_hover_animation_;
268 scoped_ptr<gfx::SlideAnimation> drop_hover_animation_; 268 scoped_ptr<gfx::SlideAnimation> drop_hover_animation_;
269 269
270 // Animation for download complete. 270 // Animation for download complete.
271 scoped_ptr<gfx::SlideAnimation> complete_animation_; 271 scoped_ptr<gfx::SlideAnimation> complete_animation_;
272 272
273 // Progress animation
274 base::RepeatingTimer progress_timer_;
275
276 // Dangerous mode buttons. 273 // Dangerous mode buttons.
277 views::LabelButton* save_button_; 274 views::LabelButton* save_button_;
278 views::LabelButton* discard_button_; 275 views::LabelButton* discard_button_;
279 276
280 // The drop down button. 277 // The drop down button.
281 BarControlButton* dropdown_button_; 278 BarControlButton* dropdown_button_;
282 279
283 // Dangerous mode label. 280 // Dangerous mode label.
284 views::Label* dangerous_download_label_; 281 views::Label* dangerous_download_label_;
285 282
(...skipping 28 matching lines...) Expand all
314 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; 311 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_;
315 312
316 // Method factory used to delay reenabling of the item when opening the 313 // Method factory used to delay reenabling of the item when opening the
317 // downloaded file. 314 // downloaded file.
318 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_; 315 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_;
319 316
320 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd); 317 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd);
321 }; 318 };
322 319
323 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ 320 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698