| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell_download_manager_delegate.h" | 5 #include "content/shell/browser/shell_download_manager_delegate.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <commdlg.h> | 9 #include <commdlg.h> |
| 10 #endif | 10 #endif |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 20 #include "content/public/browser/browser_context.h" | 20 #include "content/public/browser/browser_context.h" |
| 21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "content/public/browser/download_manager.h" | 22 #include "content/public/browser/download_manager.h" |
| 23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 24 #include "content/shell/common/shell_switches.h" | 24 #include "content/shell/common/shell_switches.h" |
| 25 #include "net/base/filename_util.h" | 25 #include "net/base/filename_util.h" |
| 26 | 26 |
| 27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) && defined(USE_AURA) |
| 28 #include "ui/aura/window.h" | 28 #include "ui/aura/window.h" // nogncheck |
| 29 #include "ui/aura/window_tree_host.h" | 29 #include "ui/aura/window_tree_host.h" // nogncheck |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 | 33 |
| 34 ShellDownloadManagerDelegate::ShellDownloadManagerDelegate() | 34 ShellDownloadManagerDelegate::ShellDownloadManagerDelegate() |
| 35 : download_manager_(NULL), | 35 : download_manager_(NULL), |
| 36 suppress_prompting_(false), | 36 suppress_prompting_(false), |
| 37 weak_ptr_factory_(this) {} | 37 weak_ptr_factory_(this) {} |
| 38 | 38 |
| 39 ShellDownloadManagerDelegate::~ShellDownloadManagerDelegate(){ | 39 ShellDownloadManagerDelegate::~ShellDownloadManagerDelegate(){ |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, result); | 188 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, result); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void ShellDownloadManagerDelegate::SetDownloadBehaviorForTesting( | 191 void ShellDownloadManagerDelegate::SetDownloadBehaviorForTesting( |
| 192 const base::FilePath& default_download_path) { | 192 const base::FilePath& default_download_path) { |
| 193 default_download_path_ = default_download_path; | 193 default_download_path_ = default_download_path; |
| 194 suppress_prompting_ = true; | 194 suppress_prompting_ = true; |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace content | 197 } // namespace content |
| OLD | NEW |