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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // side-effect of the user opening the downloads page. | 46 // side-effect of the user opening the downloads page. |
47 USER_ACTION | 47 USER_ACTION |
48 }; | 48 }; |
49 | 49 |
50 // Download progress animations ---------------------------------------------- | 50 // Download progress animations ---------------------------------------------- |
51 | 51 |
52 enum { | 52 enum { |
53 // Progress animation timer period, in milliseconds. | 53 // Progress animation timer period, in milliseconds. |
54 kProgressRateMs = 30, | 54 kProgressRateMs = 30, |
55 | 55 |
56 // Size of the space used for the progress indicator, including padding. | 56 // Size of the space used for the progress indicator. |
57 kProgressIndicatorSize = 39, | 57 kProgressIndicatorSize = 25, |
58 | 58 |
59 // x/y offset for the file type icon. | 59 // x/y offset for the file type icon. |
60 kFiletypeIconOffset = (kProgressIndicatorSize - 16) / 2 | 60 kFiletypeIconOffset = (kProgressIndicatorSize - 16) / 2 |
61 }; | 61 }; |
62 | 62 |
63 DownloadShelf(); | 63 DownloadShelf(); |
64 virtual ~DownloadShelf(); | 64 virtual ~DownloadShelf(); |
65 | 65 |
66 // Paint the common download animation progress foreground and background, | 66 // Paint the common download animation progress foreground and background, |
67 // clipping the foreground to 'percent' full. If percent is -1, then we don't | 67 // clipping the foreground to 'percent' full. If percent is -1, then we don't |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // download should belong to the DownloadManager returned by | 139 // download should belong to the DownloadManager returned by |
140 // GetDownloadManager(). | 140 // GetDownloadManager(). |
141 void ShowDownloadById(int32 download_id); | 141 void ShowDownloadById(int32 download_id); |
142 | 142 |
143 bool should_show_on_unhide_; | 143 bool should_show_on_unhide_; |
144 bool is_hidden_; | 144 bool is_hidden_; |
145 base::WeakPtrFactory<DownloadShelf> weak_ptr_factory_; | 145 base::WeakPtrFactory<DownloadShelf> weak_ptr_factory_; |
146 }; | 146 }; |
147 | 147 |
148 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 148 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
OLD | NEW |