OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/extensions/extension_downloads_api.h" | 5 #include "chrome/browser/extensions/extension_downloads_api.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/download/download_file_manager.h" | |
16 #include "chrome/browser/download/download_item.h" | |
17 #include "chrome/browser/download/download_manager.h" | |
18 #include "chrome/browser/download/download_util.h" | 15 #include "chrome/browser/download/download_util.h" |
19 #include "chrome/browser/extensions/extension_downloads_api_constants.h" | 16 #include "chrome/browser/extensions/extension_downloads_api_constants.h" |
20 #include "chrome/browser/icon_loader.h" | 17 #include "chrome/browser/icon_loader.h" |
21 #include "chrome/browser/icon_manager.h" | 18 #include "chrome/browser/icon_manager.h" |
22 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 19 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
23 #include "chrome/browser/ui/browser_list.h" | 20 #include "chrome/browser/ui/browser_list.h" |
24 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 21 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 22 #include "content/browser/download/download_file_manager.h" |
| 23 #include "content/browser/download/download_item.h" |
25 #include "content/browser/renderer_host/render_view_host.h" | 24 #include "content/browser/renderer_host/render_view_host.h" |
26 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 25 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
27 | 26 |
28 namespace constants = extension_downloads_api_constants; | 27 namespace constants = extension_downloads_api_constants; |
29 | 28 |
30 DownloadsDownloadFunction::DownloadsDownloadFunction() | 29 DownloadsDownloadFunction::DownloadsDownloadFunction() |
31 : save_as_(false), | 30 : save_as_(false), |
32 extra_headers_(NULL), | 31 extra_headers_(NULL), |
33 rdh_(NULL), | 32 rdh_(NULL), |
34 resource_context_(NULL), | 33 resource_context_(NULL), |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 DownloadsDragFunction::DownloadsDragFunction() {} | 158 DownloadsDragFunction::DownloadsDragFunction() {} |
160 DownloadsDragFunction::~DownloadsDragFunction() {} | 159 DownloadsDragFunction::~DownloadsDragFunction() {} |
161 | 160 |
162 bool DownloadsDragFunction::RunImpl() { | 161 bool DownloadsDragFunction::RunImpl() { |
163 int dl_id = 0; | 162 int dl_id = 0; |
164 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &dl_id)); | 163 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &dl_id)); |
165 VLOG(1) << __FUNCTION__ << " " << dl_id; | 164 VLOG(1) << __FUNCTION__ << " " << dl_id; |
166 error_ = constants::kNotImplemented; | 165 error_ = constants::kNotImplemented; |
167 return false; | 166 return false; |
168 } | 167 } |
OLD | NEW |