OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | |
9 #include "base/file_path.h" | 10 #include "base/file_path.h" |
10 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
11 #include "content/browser/download/download_file.h" | 12 #include "content/browser/download/download_file.h" |
12 #include "content/browser/download/download_item.h" | 13 #include "content/browser/download/download_item.h" |
13 #include "content/browser/download/download_manager.h" | 14 #include "content/browser/download/download_manager.h" |
15 #include "content/common/content_export.h" | |
14 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
15 #include "ui/base/dragdrop/download_file_interface.h" | 17 #include "ui/base/dragdrop/download_file_interface.h" |
16 | 18 |
17 class TabContents; | 19 class TabContents; |
18 | 20 |
19 namespace net { | 21 namespace net { |
20 class FileStream; | 22 class FileStream; |
21 } | 23 } |
22 | 24 |
23 class DragDownloadFile : public ui::DownloadFileProvider, | 25 class CONTENT_EXPORT DragDownloadFile |
24 public DownloadManager::Observer, | 26 : NON_EXPORTED_BASE(public ui::DownloadFileProvider), |
darin (slow to review)
2011/09/04 15:41:04
just tag DownloadFileProvider with UI_EXPORT
Dirk Pranke
2011/09/07 01:46:07
Done. I didn't realize that that worked.
| |
25 public DownloadItem::Observer { | 27 public DownloadManager::Observer, |
28 public DownloadItem::Observer { | |
26 public: | 29 public: |
27 // On Windows, we need to download into a temporary file. Two threads are | 30 // On Windows, we need to download into a temporary file. Two threads are |
28 // involved: background drag-and-drop thread and UI thread. | 31 // involved: background drag-and-drop thread and UI thread. |
29 // The first parameter file_name_or_path should contain file name while the | 32 // The first parameter file_name_or_path should contain file name while the |
30 // second parameter file_stream should be NULL. | 33 // second parameter file_stream should be NULL. |
31 // | 34 // |
32 // On MacOSX, we need to download into a file stream that has already been | 35 // On MacOSX, we need to download into a file stream that has already been |
33 // created. Only UI thread is involved. | 36 // created. Only UI thread is involved. |
34 // The file path and file stream should be provided as the first two | 37 // The file path and file stream should be provided as the first two |
35 // parameters. | 38 // parameters. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 | 109 |
107 // Access on UI thread. | 110 // Access on UI thread. |
108 DownloadManager* download_manager_; | 111 DownloadManager* download_manager_; |
109 bool download_manager_observer_added_; | 112 bool download_manager_observer_added_; |
110 DownloadItem* download_item_; | 113 DownloadItem* download_item_; |
111 | 114 |
112 DISALLOW_COPY_AND_ASSIGN(DragDownloadFile); | 115 DISALLOW_COPY_AND_ASSIGN(DragDownloadFile); |
113 }; | 116 }; |
114 | 117 |
115 #endif // CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ | 118 #endif // CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ |
OLD | NEW |