| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Download utilities. | 5 // Download utilities. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ | 7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ |
| 8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ | 8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/gfx/native_widget_types.h" |
| 14 #include "base/task.h" | 15 #include "base/task.h" |
| 15 | 16 |
| 16 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS) | 17 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS) |
| 17 #include "views/view.h" | 18 #include "views/view.h" |
| 18 #endif | 19 #endif |
| 19 | 20 |
| 20 namespace gfx { | 21 namespace gfx { |
| 21 class Canvas; | 22 class Canvas; |
| 22 } | 23 } |
| 23 | 24 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 113 |
| 113 void PaintDownloadComplete(gfx::Canvas* canvas, | 114 void PaintDownloadComplete(gfx::Canvas* canvas, |
| 114 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS) | 115 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS) |
| 115 views::View* containing_view, | 116 views::View* containing_view, |
| 116 #endif | 117 #endif |
| 117 int origin_x, | 118 int origin_x, |
| 118 int origin_y, | 119 int origin_y, |
| 119 double animation_progress, | 120 double animation_progress, |
| 120 PaintDownloadProgressSize size); | 121 PaintDownloadProgressSize size); |
| 121 | 122 |
| 122 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS) | 123 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) |
| 123 // Drag support ---------------------------------------------------------------- | 124 // Drag support ---------------------------------------------------------------- |
| 124 | 125 |
| 125 // Helper function for download views to use when acting as a drag source for a | 126 // Helper function for download views to use when acting as a drag source for a |
| 126 // DownloadItem. If 'icon' is NULL, no image will be accompany the drag. | 127 // DownloadItem. If |icon| is NULL, no image will be accompany the drag. |view| |
| 127 void DragDownload(const DownloadItem* download, SkBitmap* icon); | 128 // is only required for Mac OS X, elsewhere it can be NULL. |
| 129 void DragDownload(const DownloadItem* download, |
| 130 SkBitmap* icon, |
| 131 gfx::NativeView view); |
| 128 #endif | 132 #endif |
| 129 | 133 |
| 130 // Executable file support ----------------------------------------------------- | 134 // Executable file support ----------------------------------------------------- |
| 131 | 135 |
| 132 // Copy all executable file extensions. | 136 // Copy all executable file extensions. |
| 133 void InitializeExeTypes(std::set<std::string>* exe_extensions); | 137 void InitializeExeTypes(std::set<std::string>* exe_extensions); |
| 134 | 138 |
| 135 } // namespace download_util | 139 } // namespace download_util |
| 136 | 140 |
| 137 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ | 141 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ |
| OLD | NEW |