| 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 #include "chrome/browser/download/download_danger_prompt.h" | 5 #include "chrome/browser/download/download_danger_prompt.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 8 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 10 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 10 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 // static | 145 // static |
| 146 DownloadDangerPrompt* DownloadDangerPrompt::Create( | 146 DownloadDangerPrompt* DownloadDangerPrompt::Create( |
| 147 content::DownloadItem* item, | 147 content::DownloadItem* item, |
| 148 TabContents* tab_contents, | 148 TabContents* tab_contents, |
| 149 const base::Closure& accepted, | 149 const base::Closure& accepted, |
| 150 const base::Closure& canceled) { | 150 const base::Closure& canceled) { |
| 151 DownloadDangerPromptImpl* prompt = | 151 DownloadDangerPromptImpl* prompt = |
| 152 new DownloadDangerPromptImpl(item, tab_contents, accepted, canceled); | 152 new DownloadDangerPromptImpl(item, tab_contents, accepted, canceled); |
| 153 // |prompt| will be deleted when the dialog is done. | 153 // |prompt| will be deleted when the dialog is done. |
| 154 TabModalConfirmDialog::Create(prompt, tab_contents); | 154 TabModalConfirmDialog::Create(prompt, tab_contents->web_contents()); |
| 155 return prompt; | 155 return prompt; |
| 156 } | 156 } |
| OLD | NEW |