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

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

Issue 56026: Move message flags into a separate header that can be used (Closed)
Patch Set: ctor Created 11 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/js_before_unload_handler_win.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_request_dialog_delegate_win.h" 5 #include "chrome/browser/download/download_request_dialog_delegate_win.h"
6 6
7 #include "chrome/browser/tab_contents/constrained_window.h" 7 #include "chrome/browser/tab_contents/constrained_window.h"
8 #include "chrome/browser/tab_contents/tab_contents.h" 8 #include "chrome/browser/tab_contents/tab_contents.h"
9 #include "chrome/common/l10n_util.h" 9 #include "chrome/common/l10n_util.h"
10 #include "chrome/common/message_box_flags.h"
10 #include "chrome/views/controls/message_box_view.h" 11 #include "chrome/views/controls/message_box_view.h"
11 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
12 13
13 // static 14 // static
14 DownloadRequestDialogDelegate* DownloadRequestDialogDelegate::Create( 15 DownloadRequestDialogDelegate* DownloadRequestDialogDelegate::Create(
15 TabContents* tab, 16 TabContents* tab,
16 DownloadRequestManager::TabDownloadState* host) { 17 DownloadRequestManager::TabDownloadState* host) {
17 return new DownloadRequestDialogDelegateWin(tab, host); 18 return new DownloadRequestDialogDelegateWin(tab, host);
18 } 19 }
19 20
20 DownloadRequestDialogDelegateWin::DownloadRequestDialogDelegateWin( 21 DownloadRequestDialogDelegateWin::DownloadRequestDialogDelegateWin(
21 TabContents* tab, 22 TabContents* tab,
22 DownloadRequestManager::TabDownloadState* host) 23 DownloadRequestManager::TabDownloadState* host)
23 : DownloadRequestDialogDelegate(host) { 24 : DownloadRequestDialogDelegate(host) {
24 message_view_ = new MessageBoxView( 25 message_view_ = new MessageBoxView(
25 MessageBoxView::kIsConfirmMessageBox, 26 MessageBox::kIsConfirmMessageBox,
26 l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING), 27 l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING),
27 std::wstring()); 28 std::wstring());
28 window_ = tab->CreateConstrainedDialog(this, message_view_); 29 window_ = tab->CreateConstrainedDialog(this, message_view_);
29 } 30 }
30 31
31 void DownloadRequestDialogDelegateWin::CloseWindow() { 32 void DownloadRequestDialogDelegateWin::CloseWindow() {
32 window_->CloseConstrainedWindow(); 33 window_->CloseConstrainedWindow();
33 } 34 }
34 35
35 bool DownloadRequestDialogDelegateWin::Cancel() { 36 bool DownloadRequestDialogDelegateWin::Cancel() {
(...skipping 14 matching lines...) Expand all
50 return l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING_ALLOW); 51 return l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING_ALLOW);
51 if (button == DIALOGBUTTON_CANCEL) 52 if (button == DIALOGBUTTON_CANCEL)
52 return l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING_DENY); 53 return l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING_DENY);
53 return std::wstring(); 54 return std::wstring();
54 } 55 }
55 56
56 void DownloadRequestDialogDelegateWin::DeleteDelegate() { 57 void DownloadRequestDialogDelegateWin::DeleteDelegate() {
57 DCHECK(!host_); 58 DCHECK(!host_);
58 delete this; 59 delete this;
59 } 60 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/js_before_unload_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698