| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 view that implements one download on the Download shelf. | 5 // A view 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 80 | 80 | 
| 81   // IconManager::Client interface. | 81   // IconManager::Client interface. | 
| 82   void OnExtractIconComplete(gfx::Image* icon); | 82   void OnExtractIconComplete(gfx::Image* icon); | 
| 83 | 83 | 
| 84   // Returns the DownloadItem model object belonging to this item. | 84   // Returns the DownloadItem model object belonging to this item. | 
| 85   content::DownloadItem* download() { return model_.download(); } | 85   content::DownloadItem* download() { return model_.download(); } | 
| 86 | 86 | 
| 87   // DownloadItem::Observer methods | 87   // DownloadItem::Observer methods | 
| 88   void OnDownloadUpdated(content::DownloadItem* download) override; | 88   void OnDownloadUpdated(content::DownloadItem* download) override; | 
| 89   void OnDownloadOpened(content::DownloadItem* download) override; | 89   void OnDownloadOpened(content::DownloadItem* download) override; | 
|  | 90   void OnDownloadShown(content::DownloadItem* download) override; | 
| 90   void OnDownloadDestroyed(content::DownloadItem* download) override; | 91   void OnDownloadDestroyed(content::DownloadItem* download) override; | 
| 91 | 92 | 
| 92   // Overridden from views::View: | 93   // Overridden from views::View: | 
| 93   void Layout() override; | 94   void Layout() override; | 
| 94   gfx::Size GetPreferredSize() const override; | 95   gfx::Size GetPreferredSize() const override; | 
| 95   bool OnMousePressed(const ui::MouseEvent& event) override; | 96   bool OnMousePressed(const ui::MouseEvent& event) override; | 
| 96   bool OnMouseDragged(const ui::MouseEvent& event) override; | 97   bool OnMouseDragged(const ui::MouseEvent& event) override; | 
| 97   void OnMouseReleased(const ui::MouseEvent& event) override; | 98   void OnMouseReleased(const ui::MouseEvent& event) override; | 
| 98   void OnMouseCaptureLost() override; | 99   void OnMouseCaptureLost() override; | 
| 99   bool OnKeyPressed(const ui::KeyEvent& event) override; | 100   bool OnKeyPressed(const ui::KeyEvent& event) override; | 
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 321   std::unique_ptr<extensions::ExperienceSamplingEvent> sampling_event_; | 322   std::unique_ptr<extensions::ExperienceSamplingEvent> sampling_event_; | 
| 322 | 323 | 
| 323   // Method factory used to delay reenabling of the item when opening the | 324   // Method factory used to delay reenabling of the item when opening the | 
| 324   // downloaded file. | 325   // downloaded file. | 
| 325   base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_; | 326   base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_; | 
| 326 | 327 | 
| 327   DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 328   DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 
| 328 }; | 329 }; | 
| 329 | 330 | 
| 330 #endif  // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H_ | 331 #endif  // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H_ | 
| OLD | NEW | 
|---|