OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 struct DropDownImageSet { | 107 struct DropDownImageSet { |
108 SkBitmap* top; | 108 SkBitmap* top; |
109 SkBitmap* center; | 109 SkBitmap* center; |
110 SkBitmap* bottom; | 110 SkBitmap* bottom; |
111 }; | 111 }; |
112 | 112 |
113 void OpenDownload(); | 113 void OpenDownload(); |
114 | 114 |
115 void LoadIcon(); | 115 void LoadIcon(); |
116 | 116 |
| 117 virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip); |
| 118 |
117 // Convenience method to paint the 3 vertical bitmaps (bottom, middle, top) | 119 // Convenience method to paint the 3 vertical bitmaps (bottom, middle, top) |
118 // that form the background. | 120 // that form the background. |
119 void PaintBitmaps(gfx::Canvas* canvas, | 121 void PaintBitmaps(gfx::Canvas* canvas, |
120 const SkBitmap* top_bitmap, | 122 const SkBitmap* top_bitmap, |
121 const SkBitmap* center_bitmap, | 123 const SkBitmap* center_bitmap, |
122 const SkBitmap* bottom_bitmap, | 124 const SkBitmap* bottom_bitmap, |
123 int x, | 125 int x, |
124 int y, | 126 int y, |
125 int height, | 127 int height, |
126 int width); | 128 int width); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // Our parent view that owns us. | 171 // Our parent view that owns us. |
170 DownloadShelfView* parent_; | 172 DownloadShelfView* parent_; |
171 | 173 |
172 // Elements of our particular download | 174 // Elements of our particular download |
173 std::wstring status_text_; | 175 std::wstring status_text_; |
174 bool show_status_text_; | 176 bool show_status_text_; |
175 | 177 |
176 // The font used to print the file name and status. | 178 // The font used to print the file name and status. |
177 gfx::Font font_; | 179 gfx::Font font_; |
178 | 180 |
| 181 // The tooltip. |
| 182 std::wstring tooltip_text_; |
| 183 |
179 // The current state (normal, hot or pushed) of the body and drop-down. | 184 // The current state (normal, hot or pushed) of the body and drop-down. |
180 State body_state_; | 185 State body_state_; |
181 State drop_down_state_; | 186 State drop_down_state_; |
182 | 187 |
183 // In degrees, for downloads with no known total size. | 188 // In degrees, for downloads with no known total size. |
184 int progress_angle_; | 189 int progress_angle_; |
185 | 190 |
186 // The left and right x coordinates of the drop-down button. | 191 // The left and right x coordinates of the drop-down button. |
187 int drop_down_x_left_; | 192 int drop_down_x_left_; |
188 int drop_down_x_right_; | 193 int drop_down_x_right_; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // downloaded file. | 251 // downloaded file. |
247 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_; | 252 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_; |
248 | 253 |
249 // The currently running download context menu. | 254 // The currently running download context menu. |
250 scoped_ptr<DownloadShelfContextMenuWin> context_menu_; | 255 scoped_ptr<DownloadShelfContextMenuWin> context_menu_; |
251 | 256 |
252 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 257 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
253 }; | 258 }; |
254 | 259 |
255 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ | 260 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ |
OLD | NEW |