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

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

Issue 15881012: Implement safebrowsing download feedback service, enabled for dev & canary only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 months 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 | Annotate | Revision Log
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 // The image set associated with the drop-down button on the right. 140 // The image set associated with the drop-down button on the right.
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.
150 // If true is returned, the DownloadItem and |this| have been deleted. If
151 // false is returned, nothing has changed.
152 bool BeginDownloadFeedback();
153
149 void LoadIcon(); 154 void LoadIcon();
150 void LoadIconIfItemPathChanged(); 155 void LoadIconIfItemPathChanged();
151 156
152 // Update the button colors based on the current theme. 157 // Update the button colors based on the current theme.
153 void UpdateColorsFromTheme(); 158 void UpdateColorsFromTheme();
154 159
155 // Shows the context menu at the specified location. |point| is in the view's 160 // Shows the context menu at the specified location. |point| is in the view's
156 // coordinate system. 161 // coordinate system.
157 void ShowContextMenuImpl(const gfx::Point& point, bool is_mouse_gesture); 162 void ShowContextMenuImpl(const gfx::Point& point, bool is_mouse_gesture);
158 163
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 328
324 // The icon loaded in the download shelf is based on the file path of the 329 // The icon loaded in the download shelf is based on the file path of the
325 // item. Store the path used, so that we can detect a change in the path 330 // item. Store the path used, so that we can detect a change in the path
326 // and reload the icon. 331 // and reload the icon.
327 base::FilePath last_download_item_path_; 332 base::FilePath last_download_item_path_;
328 333
329 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); 334 DISALLOW_COPY_AND_ASSIGN(DownloadItemView);
330 }; 335 };
331 336
332 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ 337 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698