OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/repost_form_warning_view.h" | 5 #include "chrome/browser/ui/views/repost_form_warning_view.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/repost_form_warning_controller.h" | 8 #include "chrome/browser/repost_form_warning_controller.h" |
9 #include "chrome/browser/ui/browser_list.h" | 9 #include "chrome/browser/ui/browser_list.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_RESEND)); | 56 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_RESEND)); |
57 if (button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL) | 57 if (button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL) |
58 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_CANCEL)); | 58 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_CANCEL)); |
59 return std::wstring(); | 59 return std::wstring(); |
60 } | 60 } |
61 | 61 |
62 views::View* RepostFormWarningView::GetContentsView() { | 62 views::View* RepostFormWarningView::GetContentsView() { |
63 return message_box_view_; | 63 return message_box_view_; |
64 } | 64 } |
65 | 65 |
| 66 views::Widget* RepostFormWarningView::GetWidget() { |
| 67 return message_box_view_->GetWidget(); |
| 68 } |
| 69 |
| 70 const views::Widget* RepostFormWarningView::GetWidget() const { |
| 71 return message_box_view_->GetWidget(); |
| 72 } |
| 73 |
66 bool RepostFormWarningView::Cancel() { | 74 bool RepostFormWarningView::Cancel() { |
67 controller_->Cancel(); | 75 controller_->Cancel(); |
68 return true; | 76 return true; |
69 } | 77 } |
70 | 78 |
71 bool RepostFormWarningView::Accept() { | 79 bool RepostFormWarningView::Accept() { |
72 controller_->Continue(); | 80 controller_->Continue(); |
73 return true; | 81 return true; |
74 } | 82 } |
75 | 83 |
76 /////////////////////////////////////////////////////////////////////////////// | 84 /////////////////////////////////////////////////////////////////////////////// |
77 // RepostFormWarningView, RepostFormWarning implementation: | 85 // RepostFormWarningView, RepostFormWarning implementation: |
78 | 86 |
79 void RepostFormWarningView::DeleteDelegate() { | 87 void RepostFormWarningView::DeleteDelegate() { |
80 delete this; | 88 delete this; |
81 } | 89 } |
OLD | NEW |