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

Side by Side Diff: chrome/browser/ui/views/download/download_in_progress_dialog_view.cc

Issue 10378086: views: Add a new ctor to MessageBoxView that takes only a InitParams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
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/ui/views/download/download_in_progress_dialog_view.h" 5 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 break; 68 break;
69 default: 69 default:
70 // This dialog should have been created within the same thread invocation 70 // This dialog should have been created within the same thread invocation
71 // as the original test that lead to us, so it should always not be ok 71 // as the original test that lead to us, so it should always not be ok
72 // to close. 72 // to close.
73 NOTREACHED(); 73 NOTREACHED();
74 } 74 }
75 cancel_button_text_ = l10n_util::GetStringUTF16( 75 cancel_button_text_ = l10n_util::GetStringUTF16(
76 IDS_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL); 76 IDS_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
77 77
78 message_box_view_ = new views::MessageBoxView( 78 message_box_view_ = new views::MessageBoxView(explanation_text);
79 views::MessageBoxView::NO_OPTIONS, explanation_text, string16());
80 } 79 }
81 80
82 DownloadInProgressDialogView::~DownloadInProgressDialogView() {} 81 DownloadInProgressDialogView::~DownloadInProgressDialogView() {}
83 82
84 int DownloadInProgressDialogView::GetDefaultDialogButton() const { 83 int DownloadInProgressDialogView::GetDefaultDialogButton() const {
85 return ui::DIALOG_BUTTON_CANCEL; 84 return ui::DIALOG_BUTTON_CANCEL;
86 } 85 }
87 86
88 string16 DownloadInProgressDialogView::GetDialogButtonLabel( 87 string16 DownloadInProgressDialogView::GetDialogButtonLabel(
89 ui::DialogButton button) const { 88 ui::DialogButton button) const {
(...skipping 27 matching lines...) Expand all
117 return message_box_view_->GetWidget(); 116 return message_box_view_->GetWidget();
118 } 117 }
119 118
120 const views::Widget* DownloadInProgressDialogView::GetWidget() const { 119 const views::Widget* DownloadInProgressDialogView::GetWidget() const {
121 return message_box_view_->GetWidget(); 120 return message_box_view_->GetWidget();
122 } 121 }
123 122
124 views::View* DownloadInProgressDialogView::GetContentsView() { 123 views::View* DownloadInProgressDialogView::GetContentsView() {
125 return message_box_view_; 124 return message_box_view_;
126 } 125 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/simple_message_box_views.cc » ('j') | ui/views/controls/message_box_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698