OLD | NEW |
---|---|
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 struct DropDownImageSet { | 141 struct DropDownImageSet { |
142 gfx::ImageSkia* top; | 142 gfx::ImageSkia* top; |
143 gfx::ImageSkia* center; | 143 gfx::ImageSkia* center; |
144 gfx::ImageSkia* bottom; | 144 gfx::ImageSkia* bottom; |
145 }; | 145 }; |
146 | 146 |
147 void OpenDownload(); | 147 void OpenDownload(); |
148 | 148 |
149 // Submit the downloaded file to the safebrowsing download feedback service. | 149 // Submit the downloaded file to the safebrowsing download feedback service. |
150 // If true is returned, the DownloadItem and |this| have been deleted. If | 150 // If true is returned, the DownloadItem and |this| have been deleted. If |
151 // false is returned, nothing has changed. | 151 // false is returned, nothing has changed. |
Peter Kasting
2014/02/04 21:56:33
Nit: While here, maybe change to:
Submits the dow
felt
2014/02/04 23:37:22
Done.
| |
152 bool BeginDownloadFeedback(); | 152 bool BeginDownloadFeedback(); |
Peter Kasting
2014/02/04 21:56:33
Nit: This function name and the one below seem som
felt
2014/02/04 23:37:22
Done.
| |
153 | 153 |
154 // If the user has enabled uploading, calls BeginDownloadFeedback. Otherwise, | |
155 // it simply removes the DownloadItem without uploading. | |
156 void BeginDownloadFeedbackWrapper(bool user_enabled); | |
Peter Kasting
2014/02/04 21:56:33
Nit: Header declaration order does not mach .cc de
felt
2014/02/04 23:37:22
Done.
| |
157 | |
154 void LoadIcon(); | 158 void LoadIcon(); |
155 void LoadIconIfItemPathChanged(); | 159 void LoadIconIfItemPathChanged(); |
156 | 160 |
157 // Update the button colors based on the current theme. | 161 // Update the button colors based on the current theme. |
158 void UpdateColorsFromTheme(); | 162 void UpdateColorsFromTheme(); |
159 | 163 |
160 // Shows the context menu at the specified location. |point| is in the view's | 164 // Shows the context menu at the specified location. |point| is in the view's |
161 // coordinate system. | 165 // coordinate system. |
162 void ShowContextMenuImpl(const gfx::Point& point, | 166 void ShowContextMenuImpl(const gfx::Point& point, |
163 ui::MenuSourceType source_type); | 167 ui::MenuSourceType source_type); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
332 | 336 |
333 // The icon loaded in the download shelf is based on the file path of the | 337 // The icon loaded in the download shelf is based on the file path of the |
334 // item. Store the path used, so that we can detect a change in the path | 338 // item. Store the path used, so that we can detect a change in the path |
335 // and reload the icon. | 339 // and reload the icon. |
336 base::FilePath last_download_item_path_; | 340 base::FilePath last_download_item_path_; |
337 | 341 |
338 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 342 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
339 }; | 343 }; |
340 | 344 |
341 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ | 345 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ |
OLD | NEW |