| 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. |
| 11 // | 11 // |
| 12 // The DownloadItemView lives in the Browser, and has a corresponding | 12 // The DownloadItemView lives in the Browser, and has a corresponding |
| 13 // DownloadController that receives / writes data which lives in the | 13 // DownloadController that receives / writes data which lives in the |
| 14 // Renderer. | 14 // Renderer. |
| 15 | 15 |
| 16 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ | 16 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ |
| 17 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ | 17 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ |
| 18 | 18 |
| 19 #include <string> | 19 #include <string> |
| 20 | 20 |
| 21 #include "base/basictypes.h" | 21 #include "base/basictypes.h" |
| 22 #include "base/memory/scoped_ptr.h" | 22 #include "base/memory/scoped_ptr.h" |
| 23 #include "base/memory/weak_ptr.h" | 23 #include "base/memory/weak_ptr.h" |
| 24 #include "base/string_util.h" | 24 #include "base/strings/string_util.h" |
| 25 #include "base/time.h" | 25 #include "base/time.h" |
| 26 #include "base/timer.h" | 26 #include "base/timer.h" |
| 27 #include "chrome/browser/download/download_item_model.h" | 27 #include "chrome/browser/download/download_item_model.h" |
| 28 #include "chrome/browser/icon_manager.h" | 28 #include "chrome/browser/icon_manager.h" |
| 29 #include "chrome/common/cancelable_task_tracker.h" | 29 #include "chrome/common/cancelable_task_tracker.h" |
| 30 #include "content/public/browser/download_item.h" | 30 #include "content/public/browser/download_item.h" |
| 31 #include "content/public/browser/download_manager.h" | 31 #include "content/public/browser/download_manager.h" |
| 32 #include "ui/base/animation/animation_delegate.h" | 32 #include "ui/base/animation/animation_delegate.h" |
| 33 #include "ui/gfx/font.h" | 33 #include "ui/gfx/font.h" |
| 34 #include "ui/views/context_menu_controller.h" | 34 #include "ui/views/context_menu_controller.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 // The icon loaded in the download shelf is based on the file path of the | 324 // 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 | 325 // item. Store the path used, so that we can detect a change in the path |
| 326 // and reload the icon. | 326 // and reload the icon. |
| 327 base::FilePath last_download_item_path_; | 327 base::FilePath last_download_item_path_; |
| 328 | 328 |
| 329 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 329 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
| 330 }; | 330 }; |
| 331 | 331 |
| 332 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ | 332 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ |
| OLD | NEW |