| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // IconManager::Client interface. | 66 // IconManager::Client interface. |
| 67 void OnExtractIconComplete(gfx::Image* icon); | 67 void OnExtractIconComplete(gfx::Image* icon); |
| 68 | 68 |
| 69 // Returns the DownloadItem model object belonging to this item. | 69 // Returns the DownloadItem model object belonging to this item. |
| 70 content::DownloadItem* download() { return model_.download(); } | 70 content::DownloadItem* download() { return model_.download(); } |
| 71 | 71 |
| 72 // DownloadItem::Observer methods | 72 // DownloadItem::Observer methods |
| 73 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; | 73 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
| 74 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; | 74 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; |
| 75 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; | 75 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; |
| 76 virtual void OnDownloadShown(content::DownloadItem* download) OVERRIDE; |
| 76 | 77 |
| 77 // Overridden from views::View: | 78 // Overridden from views::View: |
| 78 virtual void Layout() OVERRIDE; | 79 virtual void Layout() OVERRIDE; |
| 79 virtual gfx::Size GetPreferredSize() OVERRIDE; | 80 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 80 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 81 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 81 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 82 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
| 82 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 83 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
| 83 virtual void OnMouseCaptureLost() OVERRIDE; | 84 virtual void OnMouseCaptureLost() OVERRIDE; |
| 84 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; | 85 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; |
| 85 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 86 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 337 |
| 337 // The icon loaded in the download shelf is based on the file path of the | 338 // The icon loaded in the download shelf is based on the file path of the |
| 338 // item. Store the path used, so that we can detect a change in the path | 339 // item. Store the path used, so that we can detect a change in the path |
| 339 // and reload the icon. | 340 // and reload the icon. |
| 340 base::FilePath last_download_item_path_; | 341 base::FilePath last_download_item_path_; |
| 341 | 342 |
| 342 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 343 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
| 343 }; | 344 }; |
| 344 | 345 |
| 345 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ | 346 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ |
| OLD | NEW |