| 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/uninstall_view.h" | 5 #include "chrome/browser/ui/views/uninstall_view.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "chrome/browser/shell_integration.h" | 10 #include "chrome/browser/shell_integration.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 122 } |
| 123 return true; | 123 return true; |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool UninstallView::Cancel() { | 126 bool UninstallView::Cancel() { |
| 127 user_selection_ = chrome::RESULT_CODE_UNINSTALL_USER_CANCEL; | 127 user_selection_ = chrome::RESULT_CODE_UNINSTALL_USER_CANCEL; |
| 128 return true; | 128 return true; |
| 129 } | 129 } |
| 130 | 130 |
| 131 string16 UninstallView::GetDialogButtonLabel(ui::DialogButton button) const { | 131 string16 UninstallView::GetDialogButtonLabel(ui::DialogButton button) const { |
| 132 // We only want to give custom name to OK button - 'Uninstall'. Cancel | 132 // Label the OK button 'Uninstall'; Cancel remains the same. |
| 133 // button remains same. | |
| 134 if (button == ui::DIALOG_BUTTON_OK) | 133 if (button == ui::DIALOG_BUTTON_OK) |
| 135 return l10n_util::GetStringUTF16(IDS_UNINSTALL_BUTTON_TEXT); | 134 return l10n_util::GetStringUTF16(IDS_UNINSTALL_BUTTON_TEXT); |
| 136 return string16(); | 135 return views::DialogDelegateView::GetDialogButtonLabel(button); |
| 137 } | 136 } |
| 138 | 137 |
| 139 void UninstallView::ButtonPressed(views::Button* sender, | 138 void UninstallView::ButtonPressed(views::Button* sender, |
| 140 const ui::Event& event) { | 139 const ui::Event& event) { |
| 141 if (change_default_browser_ == sender) { | 140 if (change_default_browser_ == sender) { |
| 142 // Disable the browsers combobox if the user unchecks the checkbox. | 141 // Disable the browsers combobox if the user unchecks the checkbox. |
| 143 DCHECK(browsers_combo_); | 142 DCHECK(browsers_combo_); |
| 144 browsers_combo_->SetEnabled(change_default_browser_->checked()); | 143 browsers_combo_->SetEnabled(change_default_browser_->checked()); |
| 145 } | 144 } |
| 146 } | 145 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 170 base::RunLoop run_loop(&accelerator_handler); | 169 base::RunLoop run_loop(&accelerator_handler); |
| 171 UninstallView* view = new UninstallView(&result, | 170 UninstallView* view = new UninstallView(&result, |
| 172 run_loop.QuitClosure(), | 171 run_loop.QuitClosure(), |
| 173 show_delete_profile); | 172 show_delete_profile); |
| 174 views::Widget::CreateWindow(view)->Show(); | 173 views::Widget::CreateWindow(view)->Show(); |
| 175 run_loop.Run(); | 174 run_loop.Run(); |
| 176 return result; | 175 return result; |
| 177 } | 176 } |
| 178 | 177 |
| 179 } // namespace chrome | 178 } // namespace chrome |
| OLD | NEW |