| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class DownloadsDownloadFunction : public AsyncExtensionFunction { | 51 class DownloadsDownloadFunction : public AsyncExtensionFunction { |
| 52 public: | 52 public: |
| 53 DECLARE_EXTENSION_FUNCTION_NAME("downloads.download"); | 53 DECLARE_EXTENSION_FUNCTION_NAME("downloads.download"); |
| 54 DownloadsDownloadFunction(); | 54 DownloadsDownloadFunction(); |
| 55 virtual bool RunImpl() OVERRIDE; | 55 virtual bool RunImpl() OVERRIDE; |
| 56 | 56 |
| 57 protected: | 57 protected: |
| 58 virtual ~DownloadsDownloadFunction(); | 58 virtual ~DownloadsDownloadFunction(); |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 void OnStarted(content::DownloadId dl_id, net::Error error); | 61 void OnStarted(content::DownloadItem* item, net::Error error); |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(DownloadsDownloadFunction); | 63 DISALLOW_COPY_AND_ASSIGN(DownloadsDownloadFunction); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 class DownloadsSearchFunction : public SyncExtensionFunction { | 66 class DownloadsSearchFunction : public SyncExtensionFunction { |
| 67 public: | 67 public: |
| 68 DECLARE_EXTENSION_FUNCTION_NAME("downloads.search"); | 68 DECLARE_EXTENSION_FUNCTION_NAME("downloads.search"); |
| 69 DownloadsSearchFunction(); | 69 DownloadsSearchFunction(); |
| 70 virtual bool RunImpl() OVERRIDE; | 70 virtual bool RunImpl() OVERRIDE; |
| 71 | 71 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 private: | 240 private: |
| 241 void DispatchEvent(const char* event_name, base::Value* json_arg); | 241 void DispatchEvent(const char* event_name, base::Value* json_arg); |
| 242 | 242 |
| 243 Profile* profile_; | 243 Profile* profile_; |
| 244 AllDownloadItemNotifier notifier_; | 244 AllDownloadItemNotifier notifier_; |
| 245 | 245 |
| 246 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); | 246 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 249 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
| OLD | NEW |