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_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 class DownloadsAcceptDangerFunction : public AsyncExtensionFunction { | 134 class DownloadsAcceptDangerFunction : public AsyncExtensionFunction { |
135 public: | 135 public: |
136 DECLARE_EXTENSION_FUNCTION("downloads.acceptDanger", DOWNLOADS_ACCEPTDANGER) | 136 DECLARE_EXTENSION_FUNCTION("downloads.acceptDanger", DOWNLOADS_ACCEPTDANGER) |
137 DownloadsAcceptDangerFunction(); | 137 DownloadsAcceptDangerFunction(); |
138 virtual bool RunImpl() OVERRIDE; | 138 virtual bool RunImpl() OVERRIDE; |
139 | 139 |
140 protected: | 140 protected: |
141 virtual ~DownloadsAcceptDangerFunction(); | 141 virtual ~DownloadsAcceptDangerFunction(); |
142 void DangerPromptCallback(bool accept, int download_id); | 142 void DangerPromptCallback(bool accept, int download_id); |
| 143 void DangerPromptDestroyed(); |
143 | 144 |
144 private: | 145 private: |
145 DISALLOW_COPY_AND_ASSIGN(DownloadsAcceptDangerFunction); | 146 DISALLOW_COPY_AND_ASSIGN(DownloadsAcceptDangerFunction); |
146 }; | 147 }; |
147 | 148 |
148 class DownloadsShowFunction : public AsyncExtensionFunction { | 149 class DownloadsShowFunction : public AsyncExtensionFunction { |
149 public: | 150 public: |
150 DECLARE_EXTENSION_FUNCTION("downloads.show", DOWNLOADS_SHOW) | 151 DECLARE_EXTENSION_FUNCTION("downloads.show", DOWNLOADS_SHOW) |
151 DownloadsShowFunction(); | 152 DownloadsShowFunction(); |
152 virtual bool RunImpl() OVERRIDE; | 153 virtual bool RunImpl() OVERRIDE; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 const extensions::Event::WillDispatchCallback& will_dispatch_callback, | 272 const extensions::Event::WillDispatchCallback& will_dispatch_callback, |
272 base::Value* json_arg); | 273 base::Value* json_arg); |
273 | 274 |
274 Profile* profile_; | 275 Profile* profile_; |
275 AllDownloadItemNotifier notifier_; | 276 AllDownloadItemNotifier notifier_; |
276 | 277 |
277 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); | 278 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); |
278 }; | 279 }; |
279 | 280 |
280 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 281 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
OLD | NEW |