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 UI_BASE_DRAGDROP_DOWNLOAD_FILE_INTERFACE_H_ | 5 #ifndef UI_BASE_DRAGDROP_DOWNLOAD_FILE_INTERFACE_H_ |
6 #define UI_BASE_DRAGDROP_DOWNLOAD_FILE_INTERFACE_H_ | 6 #define UI_BASE_DRAGDROP_DOWNLOAD_FILE_INTERFACE_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 | 12 |
13 #include "ui/base/ui_export.h" | 13 #include "ui/base/ui_export.h" |
14 | 14 |
15 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
16 #include <objidl.h> | 16 #include <objidl.h> |
17 #endif | 17 #endif |
18 | 18 |
| 19 namespace base { |
19 class FilePath; | 20 class FilePath; |
| 21 } |
20 | 22 |
21 namespace ui { | 23 namespace ui { |
22 | 24 |
23 // TODO(benjhayden, anybody): Do these need to be RefCountedThreadSafe? | 25 // TODO(benjhayden, anybody): Do these need to be RefCountedThreadSafe? |
24 | 26 |
25 // Defines the interface to observe the status of file download. | 27 // Defines the interface to observe the status of file download. |
26 class UI_EXPORT DownloadFileObserver | 28 class UI_EXPORT DownloadFileObserver |
27 : public base::RefCountedThreadSafe<DownloadFileObserver> { | 29 : public base::RefCountedThreadSafe<DownloadFileObserver> { |
28 public: | 30 public: |
29 virtual void OnDownloadCompleted(const FilePath& file_path) = 0; | 31 virtual void OnDownloadCompleted(const FilePath& file_path) = 0; |
(...skipping 19 matching lines...) Expand all Loading... |
49 virtual void Stop() = 0; | 51 virtual void Stop() = 0; |
50 | 52 |
51 protected: | 53 protected: |
52 friend class base::RefCountedThreadSafe<DownloadFileProvider>; | 54 friend class base::RefCountedThreadSafe<DownloadFileProvider>; |
53 virtual ~DownloadFileProvider() {} | 55 virtual ~DownloadFileProvider() {} |
54 }; | 56 }; |
55 | 57 |
56 } // namespace ui | 58 } // namespace ui |
57 | 59 |
58 #endif // UI_BASE_DRAGDROP_DOWNLOAD_FILE_INTERFACE_H_ | 60 #endif // UI_BASE_DRAGDROP_DOWNLOAD_FILE_INTERFACE_H_ |
OLD | NEW |