Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api.h

Issue 11068027: OnDownloadStarted takes DownloadItem* instead of DownloadId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r160830 Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/api/downloads/downloads_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698