| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 void DangerPromptCallback(int download_id, | 208 void DangerPromptCallback(int download_id, |
| 209 DownloadDangerPrompt::Action action); | 209 DownloadDangerPrompt::Action action); |
| 210 | 210 |
| 211 private: | 211 private: |
| 212 void PromptOrWait(int download_id, int retries); | 212 void PromptOrWait(int download_id, int retries); |
| 213 | 213 |
| 214 static OnPromptCreatedCallback* on_prompt_created_; | 214 static OnPromptCreatedCallback* on_prompt_created_; |
| 215 DISALLOW_COPY_AND_ASSIGN(DownloadsAcceptDangerFunction); | 215 DISALLOW_COPY_AND_ASSIGN(DownloadsAcceptDangerFunction); |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 class DownloadsShowFunction : public ChromeAsyncExtensionFunction { | 218 class DownloadsShowFunction : public ChromeSyncExtensionFunction { |
| 219 public: | 219 public: |
| 220 DECLARE_EXTENSION_FUNCTION("downloads.show", DOWNLOADS_SHOW) | 220 DECLARE_EXTENSION_FUNCTION("downloads.show", DOWNLOADS_SHOW) |
| 221 DownloadsShowFunction(); | 221 DownloadsShowFunction(); |
| 222 bool RunAsync() override; | 222 bool RunSync() override; |
| 223 | 223 |
| 224 protected: | 224 protected: |
| 225 ~DownloadsShowFunction() override; | 225 ~DownloadsShowFunction() override; |
| 226 | 226 |
| 227 private: | 227 private: |
| 228 DISALLOW_COPY_AND_ASSIGN(DownloadsShowFunction); | 228 DISALLOW_COPY_AND_ASSIGN(DownloadsShowFunction); |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 class DownloadsShowDefaultFolderFunction : public ChromeAsyncExtensionFunction { | 231 class DownloadsShowDefaultFolderFunction : public ChromeSyncExtensionFunction { |
| 232 public: | 232 public: |
| 233 DECLARE_EXTENSION_FUNCTION( | 233 DECLARE_EXTENSION_FUNCTION( |
| 234 "downloads.showDefaultFolder", DOWNLOADS_SHOWDEFAULTFOLDER) | 234 "downloads.showDefaultFolder", DOWNLOADS_SHOWDEFAULTFOLDER) |
| 235 DownloadsShowDefaultFolderFunction(); | 235 DownloadsShowDefaultFolderFunction(); |
| 236 bool RunAsync() override; | 236 bool RunSync() override; |
| 237 | 237 |
| 238 protected: | 238 protected: |
| 239 ~DownloadsShowDefaultFolderFunction() override; | 239 ~DownloadsShowDefaultFolderFunction() override; |
| 240 | 240 |
| 241 private: | 241 private: |
| 242 DISALLOW_COPY_AND_ASSIGN(DownloadsShowDefaultFolderFunction); | 242 DISALLOW_COPY_AND_ASSIGN(DownloadsShowDefaultFolderFunction); |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 class DownloadsOpenFunction : public ChromeSyncExtensionFunction { | 245 class DownloadsOpenFunction : public ChromeSyncExtensionFunction { |
| 246 public: | 246 public: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 262 DownloadsSetShelfEnabledFunction(); | 262 DownloadsSetShelfEnabledFunction(); |
| 263 bool RunSync() override; | 263 bool RunSync() override; |
| 264 | 264 |
| 265 protected: | 265 protected: |
| 266 ~DownloadsSetShelfEnabledFunction() override; | 266 ~DownloadsSetShelfEnabledFunction() override; |
| 267 | 267 |
| 268 private: | 268 private: |
| 269 DISALLOW_COPY_AND_ASSIGN(DownloadsSetShelfEnabledFunction); | 269 DISALLOW_COPY_AND_ASSIGN(DownloadsSetShelfEnabledFunction); |
| 270 }; | 270 }; |
| 271 | 271 |
| 272 class DownloadsDragFunction : public ChromeAsyncExtensionFunction { | 272 class DownloadsDragFunction : public ChromeSyncExtensionFunction { |
| 273 public: | 273 public: |
| 274 DECLARE_EXTENSION_FUNCTION("downloads.drag", DOWNLOADS_DRAG) | 274 DECLARE_EXTENSION_FUNCTION("downloads.drag", DOWNLOADS_DRAG) |
| 275 DownloadsDragFunction(); | 275 DownloadsDragFunction(); |
| 276 bool RunAsync() override; | 276 bool RunSync() override; |
| 277 | 277 |
| 278 protected: | 278 protected: |
| 279 ~DownloadsDragFunction() override; | 279 ~DownloadsDragFunction() override; |
| 280 | 280 |
| 281 private: | 281 private: |
| 282 DISALLOW_COPY_AND_ASSIGN(DownloadsDragFunction); | 282 DISALLOW_COPY_AND_ASSIGN(DownloadsDragFunction); |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 class DownloadsGetFileIconFunction : public ChromeAsyncExtensionFunction { | 285 class DownloadsGetFileIconFunction : public ChromeAsyncExtensionFunction { |
| 286 public: | 286 public: |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 ScopedObserver<extensions::ExtensionRegistry, | 406 ScopedObserver<extensions::ExtensionRegistry, |
| 407 extensions::ExtensionRegistryObserver> | 407 extensions::ExtensionRegistryObserver> |
| 408 extension_registry_observer_; | 408 extension_registry_observer_; |
| 409 | 409 |
| 410 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); | 410 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); |
| 411 }; | 411 }; |
| 412 | 412 |
| 413 } // namespace extensions | 413 } // namespace extensions |
| 414 | 414 |
| 415 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 415 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
| OLD | NEW |