| 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 "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 10 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 11 #include "chrome/browser/download/download_stats.h" | 11 #include "chrome/browser/download/download_stats.h" |
| 12 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 12 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 13 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 13 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
| 14 #include "chrome/grit/chromium_strings.h" |
| 15 #include "chrome/grit/generated_resources.h" |
| 14 #include "content/public/browser/download_danger_type.h" | 16 #include "content/public/browser/download_danger_type.h" |
| 15 #include "content/public/browser/download_item.h" | 17 #include "content/public/browser/download_item.h" |
| 16 #include "grit/chromium_strings.h" | |
| 17 #include "grit/generated_resources.h" | |
| 18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // TODO(wittman): Create a native web contents modal dialog implementation of | 22 // TODO(wittman): Create a native web contents modal dialog implementation of |
| 23 // this dialog for non-Views platforms, to support bold formatting of the | 23 // this dialog for non-Views platforms, to support bold formatting of the |
| 24 // message lead. | 24 // message lead. |
| 25 | 25 |
| 26 // Implements DownloadDangerPrompt using a TabModalConfirmDialog. | 26 // Implements DownloadDangerPrompt using a TabModalConfirmDialog. |
| 27 class DownloadDangerPromptImpl : public DownloadDangerPrompt, | 27 class DownloadDangerPromptImpl : public DownloadDangerPrompt, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 content::WebContents* web_contents, | 237 content::WebContents* web_contents, |
| 238 bool show_context, | 238 bool show_context, |
| 239 const OnDone& done) { | 239 const OnDone& done) { |
| 240 DownloadDangerPromptImpl* prompt = new DownloadDangerPromptImpl( | 240 DownloadDangerPromptImpl* prompt = new DownloadDangerPromptImpl( |
| 241 item, web_contents, show_context, done); | 241 item, web_contents, show_context, done); |
| 242 // |prompt| will be deleted when the dialog is done. | 242 // |prompt| will be deleted when the dialog is done. |
| 243 TabModalConfirmDialog::Create(prompt, web_contents); | 243 TabModalConfirmDialog::Create(prompt, web_contents); |
| 244 return prompt; | 244 return prompt; |
| 245 } | 245 } |
| 246 #endif | 246 #endif |
| OLD | NEW |