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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // so that screenreaders can access the filename, status text, and | 206 // so that screenreaders can access the filename, status text, and |
207 // dangerous download warning message (if any). | 207 // dangerous download warning message (if any). |
208 void UpdateAccessibleName(); | 208 void UpdateAccessibleName(); |
209 | 209 |
210 // Show/Hide/Reset |animation| based on the state transition specified by | 210 // Show/Hide/Reset |animation| based on the state transition specified by |
211 // |from| and |to|. | 211 // |from| and |to|. |
212 void AnimateStateTransition(State from, | 212 void AnimateStateTransition(State from, |
213 State to, | 213 State to, |
214 gfx::SlideAnimation* animation); | 214 gfx::SlideAnimation* animation); |
215 | 215 |
| 216 // Callback for |progress_timer_|. |
| 217 void ProgressTimerFired(); |
| 218 |
216 // Returns the base text color. | 219 // Returns the base text color. |
217 SkColor GetTextColor(); | 220 SkColor GetTextColor(); |
218 | 221 |
219 // Returns a slightly dimmed version of the base text color. | 222 // Returns a slightly dimmed version of the base text color. |
220 SkColor GetDimmedTextColor(); | 223 SkColor GetDimmedTextColor(); |
221 | 224 |
222 // The download shelf that owns us. | 225 // The download shelf that owns us. |
223 DownloadShelfView* shelf_; | 226 DownloadShelfView* shelf_; |
224 | 227 |
225 // Elements of our particular download | 228 // Elements of our particular download |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; | 317 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; |
315 | 318 |
316 // Method factory used to delay reenabling of the item when opening the | 319 // Method factory used to delay reenabling of the item when opening the |
317 // downloaded file. | 320 // downloaded file. |
318 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_; | 321 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_; |
319 | 322 |
320 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd); | 323 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd); |
321 }; | 324 }; |
322 | 325 |
323 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ | 326 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ |
OLD | NEW |