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_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 16 matching lines...) Loading... |
27 } | 27 } |
28 | 28 |
29 namespace extensions { | 29 namespace extensions { |
30 class CrxInstaller; | 30 class CrxInstaller; |
31 } | 31 } |
32 | 32 |
33 namespace user_prefs { | 33 namespace user_prefs { |
34 class PrefRegistrySyncable; | 34 class PrefRegistrySyncable; |
35 } | 35 } |
36 | 36 |
37 #if defined(COMPILER_GCC) && defined(ENABLE_EXTENSIONS) | |
38 namespace BASE_HASH_NAMESPACE { | |
39 template<> | |
40 struct hash<extensions::CrxInstaller*> { | |
41 std::size_t operator()(extensions::CrxInstaller* const& p) const { | |
42 return reinterpret_cast<std::size_t>(p); | |
43 } | |
44 }; | |
45 } // namespace BASE_HASH_NAMESPACE | |
46 #endif | |
47 | |
48 // This is the Chrome side helper for the download system. | 37 // This is the Chrome side helper for the download system. |
49 class ChromeDownloadManagerDelegate | 38 class ChromeDownloadManagerDelegate |
50 : public content::DownloadManagerDelegate, | 39 : public content::DownloadManagerDelegate, |
51 public content::NotificationObserver, | 40 public content::NotificationObserver, |
52 public DownloadTargetDeterminerDelegate { | 41 public DownloadTargetDeterminerDelegate { |
53 public: | 42 public: |
54 explicit ChromeDownloadManagerDelegate(Profile* profile); | 43 explicit ChromeDownloadManagerDelegate(Profile* profile); |
55 virtual ~ChromeDownloadManagerDelegate(); | 44 virtual ~ChromeDownloadManagerDelegate(); |
56 | 45 |
57 // Should be called before the first call to ShouldCompleteDownload() to | 46 // Should be called before the first call to ShouldCompleteDownload() to |
(...skipping 128 matching lines...) Loading... |
186 #endif | 175 #endif |
187 | 176 |
188 content::NotificationRegistrar registrar_; | 177 content::NotificationRegistrar registrar_; |
189 | 178 |
190 base::WeakPtrFactory<ChromeDownloadManagerDelegate> weak_ptr_factory_; | 179 base::WeakPtrFactory<ChromeDownloadManagerDelegate> weak_ptr_factory_; |
191 | 180 |
192 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 181 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
193 }; | 182 }; |
194 | 183 |
195 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 184 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
OLD | NEW |