Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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. |
| 11 // | 11 // |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 | 75 |
| 76 // Timer callback for handling animations | 76 // Timer callback for handling animations |
| 77 void UpdateDownloadProgress(); | 77 void UpdateDownloadProgress(); |
| 78 void StartDownloadProgress(); | 78 void StartDownloadProgress(); |
| 79 void StopDownloadProgress(); | 79 void StopDownloadProgress(); |
| 80 | 80 |
| 81 // IconManager::Client interface. | 81 // IconManager::Client interface. |
| 82 void OnExtractIconComplete(IconManager::Handle handle, SkBitmap* icon_bitmap); | 82 void OnExtractIconComplete(IconManager::Handle handle, SkBitmap* icon_bitmap); |
| 83 | 83 |
| 84 // Returns the DownloadItem model object belonging to this item. | 84 // Returns the DownloadItem model object belonging to this item. |
| 85 DownloadItem* get_download() { return download_; } | 85 DownloadItem* download() { return download_; } |
|
Jay Civelli
2010/08/26 16:10:32
Make it const.
| |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 enum State { | 88 enum State { |
| 89 NORMAL = 0, | 89 NORMAL = 0, |
| 90 HOT, | 90 HOT, |
| 91 PUSHED, | 91 PUSHED, |
| 92 DANGEROUS | 92 DANGEROUS |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // The image set associated with the part containing the icon and text. | 95 // The image set associated with the part containing the icon and text. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 | 258 |
| 259 // If non-NULL, set to true when this object is deleted. | 259 // If non-NULL, set to true when this object is deleted. |
| 260 // (Used when showing the context menu as it runs an inner message loop that | 260 // (Used when showing the context menu as it runs an inner message loop that |
| 261 // might delete us). | 261 // might delete us). |
| 262 bool* deleted_; | 262 bool* deleted_; |
| 263 | 263 |
| 264 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 264 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ | 267 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ |
| OLD | NEW |