| 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/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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( |
| 79 views::MessageBoxView::NO_OPTIONS, explanation_text, string16()); | 79 views::MessageBoxView::InitParams(explanation_text)); |
| 80 } | 80 } |
| 81 | 81 |
| 82 DownloadInProgressDialogView::~DownloadInProgressDialogView() {} | 82 DownloadInProgressDialogView::~DownloadInProgressDialogView() {} |
| 83 | 83 |
| 84 int DownloadInProgressDialogView::GetDefaultDialogButton() const { | 84 int DownloadInProgressDialogView::GetDefaultDialogButton() const { |
| 85 return ui::DIALOG_BUTTON_CANCEL; | 85 return ui::DIALOG_BUTTON_CANCEL; |
| 86 } | 86 } |
| 87 | 87 |
| 88 string16 DownloadInProgressDialogView::GetDialogButtonLabel( | 88 string16 DownloadInProgressDialogView::GetDialogButtonLabel( |
| 89 ui::DialogButton button) const { | 89 ui::DialogButton button) const { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 117 return message_box_view_->GetWidget(); | 117 return message_box_view_->GetWidget(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 const views::Widget* DownloadInProgressDialogView::GetWidget() const { | 120 const views::Widget* DownloadInProgressDialogView::GetWidget() const { |
| 121 return message_box_view_->GetWidget(); | 121 return message_box_view_->GetWidget(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 views::View* DownloadInProgressDialogView::GetContentsView() { | 124 views::View* DownloadInProgressDialogView::GetContentsView() { |
| 125 return message_box_view_; | 125 return message_box_view_; |
| 126 } | 126 } |
| OLD | NEW |