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_UI_GTK_DOWNLOAD_DOWNLOAD_ITEM_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_ITEM_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_ITEM_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_ITEM_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/task/cancelable_task_tracker.h" |
15 #include "base/time/time.h" | 16 #include "base/time/time.h" |
16 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
17 #include "chrome/browser/download/download_item_model.h" | 18 #include "chrome/browser/download/download_item_model.h" |
18 #include "chrome/browser/icon_manager.h" | 19 #include "chrome/browser/icon_manager.h" |
19 #include "chrome/common/cancelable_task_tracker.h" | |
20 #include "content/public/browser/download_item.h" | 20 #include "content/public/browser/download_item.h" |
21 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
22 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
23 #include "ui/base/gtk/gtk_signal.h" | 23 #include "ui/base/gtk/gtk_signal.h" |
24 #include "ui/base/gtk/owned_widget_gtk.h" | 24 #include "ui/base/gtk/owned_widget_gtk.h" |
25 #include "ui/gfx/animation/animation_delegate.h" | 25 #include "ui/gfx/animation/animation_delegate.h" |
26 #include "ui/gfx/animation/slide_animation.h" | 26 #include "ui/gfx/animation/slide_animation.h" |
27 | 27 |
28 class DownloadShelfContextMenuGtk; | 28 class DownloadShelfContextMenuGtk; |
29 class DownloadShelfGtk; | 29 class DownloadShelfGtk; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 // The last download file path for which we requested an icon. | 226 // The last download file path for which we requested an icon. |
227 base::FilePath icon_filepath_; | 227 base::FilePath icon_filepath_; |
228 | 228 |
229 content::NotificationRegistrar registrar_; | 229 content::NotificationRegistrar registrar_; |
230 | 230 |
231 // The time at which we were insantiated. | 231 // The time at which we were insantiated. |
232 base::Time creation_time_; | 232 base::Time creation_time_; |
233 | 233 |
234 // For canceling an in progress icon request. | 234 // For canceling an in progress icon request. |
235 CancelableTaskTracker cancelable_task_tracker_; | 235 base::CancelableTaskTracker cancelable_task_tracker_; |
236 | 236 |
237 // Indicates when the download has completed, so we don't redo | 237 // Indicates when the download has completed, so we don't redo |
238 // on-completion actions. | 238 // on-completion actions. |
239 bool download_complete_; | 239 bool download_complete_; |
240 | 240 |
241 // Whether we are currently disabled as part of opening the downloaded file. | 241 // Whether we are currently disabled as part of opening the downloaded file. |
242 bool disabled_while_opening_; | 242 bool disabled_while_opening_; |
243 | 243 |
244 // Method factory used to delay reenabling of the item when opening the | 244 // Method factory used to delay reenabling of the item when opening the |
245 // downloaded file. | 245 // downloaded file. |
246 base::WeakPtrFactory<DownloadItemGtk> weak_ptr_factory_; | 246 base::WeakPtrFactory<DownloadItemGtk> weak_ptr_factory_; |
247 }; | 247 }; |
248 | 248 |
249 #endif // CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_ITEM_GTK_H_ | 249 #endif // CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_ITEM_GTK_H_ |
OLD | NEW |