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 DownloadItemViewMd contains an application icon, a text label | 6 // Each DownloadItemViewMd 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 DownloadItemViewMd lives in the Browser, and has a corresponding | 12 // The DownloadItemViewMd 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_MD_H_ | 16 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ |
17 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ | 17 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ |
18 | 18 |
19 #include <string> | 19 #include <string> |
20 | 20 |
21 #include "base/basictypes.h" | 21 #include "base/macros.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/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
25 #include "base/task/cancelable_task_tracker.h" | 25 #include "base/task/cancelable_task_tracker.h" |
26 #include "base/time/time.h" | 26 #include "base/time/time.h" |
27 #include "base/timer/timer.h" | 27 #include "base/timer/timer.h" |
28 #include "chrome/browser/download/download_item_model.h" | 28 #include "chrome/browser/download/download_item_model.h" |
29 #include "chrome/browser/icon_manager.h" | 29 #include "chrome/browser/icon_manager.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" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; | 314 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; |
315 | 315 |
316 // Method factory used to delay reenabling of the item when opening the | 316 // Method factory used to delay reenabling of the item when opening the |
317 // downloaded file. | 317 // downloaded file. |
318 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_; | 318 base::WeakPtrFactory<DownloadItemViewMd> weak_ptr_factory_; |
319 | 319 |
320 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd); | 320 DISALLOW_COPY_AND_ASSIGN(DownloadItemViewMd); |
321 }; | 321 }; |
322 | 322 |
323 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ | 323 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_MD_H_ |
OLD | NEW |