| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 public DownloadItem::Observer, | 45 public DownloadItem::Observer, |
| 46 public AnimationDelegate { | 46 public AnimationDelegate { |
| 47 public: | 47 public: |
| 48 DownloadItemView(DownloadItem* download, | 48 DownloadItemView(DownloadItem* download, |
| 49 DownloadShelfView* parent, | 49 DownloadShelfView* parent, |
| 50 BaseDownloadItemModel* model); | 50 BaseDownloadItemModel* model); |
| 51 virtual ~DownloadItemView(); | 51 virtual ~DownloadItemView(); |
| 52 | 52 |
| 53 // DownloadObserver method | 53 // DownloadObserver method |
| 54 virtual void OnDownloadUpdated(DownloadItem* download); | 54 virtual void OnDownloadUpdated(DownloadItem* download); |
| 55 virtual void OnDownloadFileCompleted(DownloadItem* download) { } |
| 55 virtual void OnDownloadOpened(DownloadItem* download); | 56 virtual void OnDownloadOpened(DownloadItem* download); |
| 56 | 57 |
| 57 // View overrides | 58 // View overrides |
| 58 virtual void Layout(); | 59 virtual void Layout(); |
| 59 virtual void Paint(gfx::Canvas* canvas); | 60 virtual void Paint(gfx::Canvas* canvas); |
| 60 virtual gfx::Size GetPreferredSize(); | 61 virtual gfx::Size GetPreferredSize(); |
| 61 virtual void OnMouseExited(const views::MouseEvent& event); | 62 virtual void OnMouseExited(const views::MouseEvent& event); |
| 62 virtual void OnMouseMoved(const views::MouseEvent& event); | 63 virtual void OnMouseMoved(const views::MouseEvent& event); |
| 63 virtual bool OnMousePressed(const views::MouseEvent& event); | 64 virtual bool OnMousePressed(const views::MouseEvent& event); |
| 64 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); | 65 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // downloaded file. | 246 // downloaded file. |
| 246 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_; | 247 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_; |
| 247 | 248 |
| 248 // The currently running download context menu. | 249 // The currently running download context menu. |
| 249 DownloadShelfContextMenuWin* active_menu_; | 250 DownloadShelfContextMenuWin* active_menu_; |
| 250 | 251 |
| 251 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 252 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
| 252 }; | 253 }; |
| 253 | 254 |
| 254 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ | 255 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ |
| OLD | NEW |