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

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

Issue 10704026: Reland DownloadItem::Observer::OnDownloadDestroyed() replaces DownloadItem::REMOVING (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void UpdateDownloadProgress(); 66 void UpdateDownloadProgress();
67 void StartDownloadProgress(); 67 void StartDownloadProgress();
68 void StopDownloadProgress(); 68 void StopDownloadProgress();
69 69
70 // IconManager::Client interface. 70 // IconManager::Client interface.
71 void OnExtractIconComplete(IconManager::Handle handle, gfx::Image* icon); 71 void OnExtractIconComplete(IconManager::Handle handle, gfx::Image* icon);
72 72
73 // Returns the DownloadItem model object belonging to this item. 73 // Returns the DownloadItem model object belonging to this item.
74 content::DownloadItem* download() const { return download_; } 74 content::DownloadItem* download() const { return download_; }
75 75
76 // DownloadObserver method 76 // DownloadObserver methods
77 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; 77 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE;
78 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; 78 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE;
79 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE;
79 80
80 // Overridden from views::View: 81 // Overridden from views::View:
81 virtual void Layout() OVERRIDE; 82 virtual void Layout() OVERRIDE;
82 virtual gfx::Size GetPreferredSize() OVERRIDE; 83 virtual gfx::Size GetPreferredSize() OVERRIDE;
83 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 84 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
84 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; 85 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
85 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 86 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
86 virtual void OnMouseCaptureLost() OVERRIDE; 87 virtual void OnMouseCaptureLost() OVERRIDE;
87 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; 88 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE;
88 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; 89 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 306
306 // The icon loaded in the download shelf is based on the file path of the 307 // The icon loaded in the download shelf is based on the file path of the
307 // item. Store the path used, so that we can detect a change in the path 308 // item. Store the path used, so that we can detect a change in the path
308 // and reload the icon. 309 // and reload the icon.
309 FilePath last_download_item_path_; 310 FilePath last_download_item_path_;
310 311
311 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); 312 DISALLOW_COPY_AND_ASSIGN(DownloadItemView);
312 }; 313 };
313 314
314 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ 315 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698