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

Side by Side Diff: chrome/browser/download/download_danger_prompt.cc

Issue 10972002: chrome: Add TabModalConfirmDialog interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no else after return 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
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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/browser_dialogs.h"
10 #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"
11 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" 11 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "content/public/browser/download_danger_type.h" 13 #include "content/public/browser/download_danger_type.h"
14 #include "content/public/browser/download_item.h" 14 #include "content/public/browser/download_item.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
17 17
18 namespace { 18 namespace {
19 19
20 // Implements DownloadDangerPrompt using a TabModalConfirmDialog. 20 // Implements DownloadDangerPrompt using a TabModalConfirmDialog.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 chrome::ShowTabModalConfirmDialog(prompt, tab_contents); 154 TabModalConfirmDialog::Create(prompt, tab_contents);
155 return prompt; 155 return prompt;
156 } 156 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698