| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 DownloadsCancelFunction(); | 108 DownloadsCancelFunction(); |
| 109 virtual bool RunImpl() OVERRIDE; | 109 virtual bool RunImpl() OVERRIDE; |
| 110 | 110 |
| 111 protected: | 111 protected: |
| 112 virtual ~DownloadsCancelFunction(); | 112 virtual ~DownloadsCancelFunction(); |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 DISALLOW_COPY_AND_ASSIGN(DownloadsCancelFunction); | 115 DISALLOW_COPY_AND_ASSIGN(DownloadsCancelFunction); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 class DownloadsEraseFunction : public AsyncExtensionFunction { | 118 class DownloadsEraseFunction : public SyncExtensionFunction { |
| 119 public: | 119 public: |
| 120 DECLARE_EXTENSION_FUNCTION_NAME("downloads.erase"); | 120 DECLARE_EXTENSION_FUNCTION_NAME("downloads.erase"); |
| 121 DownloadsEraseFunction(); | 121 DownloadsEraseFunction(); |
| 122 virtual bool RunImpl() OVERRIDE; | 122 virtual bool RunImpl() OVERRIDE; |
| 123 | 123 |
| 124 protected: | 124 protected: |
| 125 virtual ~DownloadsEraseFunction(); | 125 virtual ~DownloadsEraseFunction(); |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 DISALLOW_COPY_AND_ASSIGN(DownloadsEraseFunction); | 128 DISALLOW_COPY_AND_ASSIGN(DownloadsEraseFunction); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 private: | 239 private: |
| 240 void DispatchEvent(const char* event_name, base::Value* json_arg); | 240 void DispatchEvent(const char* event_name, base::Value* json_arg); |
| 241 | 241 |
| 242 Profile* profile_; | 242 Profile* profile_; |
| 243 AllDownloadItemNotifier notifier_; | 243 AllDownloadItemNotifier notifier_; |
| 244 | 244 |
| 245 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); | 245 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 248 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
| OLD | NEW |