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 "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 string16 UninstallView::GetDialogButtonLabel(ui::DialogButton button) const { | 130 string16 UninstallView::GetDialogButtonLabel(ui::DialogButton button) const { |
131 // We only want to give custom name to OK button - 'Uninstall'. Cancel | 131 // We only want to give custom name to OK button - 'Uninstall'. Cancel |
132 // button remains same. | 132 // button remains same. |
133 if (button == ui::DIALOG_BUTTON_OK) | 133 if (button == ui::DIALOG_BUTTON_OK) |
134 return l10n_util::GetStringUTF16(IDS_UNINSTALL_BUTTON_TEXT); | 134 return l10n_util::GetStringUTF16(IDS_UNINSTALL_BUTTON_TEXT); |
135 return string16(); | 135 return string16(); |
136 } | 136 } |
137 | 137 |
138 void UninstallView::ButtonPressed(views::Button* sender, | 138 void UninstallView::ButtonPressed(views::Button* sender, |
139 const views::Event& event) { | 139 const ui::Event& event) { |
140 if (change_default_browser_ == sender) { | 140 if (change_default_browser_ == sender) { |
141 // Disable the browsers combobox if the user unchecks the checkbox. | 141 // Disable the browsers combobox if the user unchecks the checkbox. |
142 DCHECK(browsers_combo_); | 142 DCHECK(browsers_combo_); |
143 browsers_combo_->SetEnabled(change_default_browser_->checked()); | 143 browsers_combo_->SetEnabled(change_default_browser_->checked()); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 string16 UninstallView::GetWindowTitle() const { | 147 string16 UninstallView::GetWindowTitle() const { |
148 return l10n_util::GetStringUTF16(IDS_UNINSTALL_CHROME); | 148 return l10n_util::GetStringUTF16(IDS_UNINSTALL_CHROME); |
149 } | 149 } |
(...skipping 21 matching lines...) Expand all Loading... |
171 int result = content::RESULT_CODE_NORMAL_EXIT; | 171 int result = content::RESULT_CODE_NORMAL_EXIT; |
172 views::AcceleratorHandler accelerator_handler; | 172 views::AcceleratorHandler accelerator_handler; |
173 base::RunLoop run_loop(&accelerator_handler); | 173 base::RunLoop run_loop(&accelerator_handler); |
174 UninstallView* view = new UninstallView(&result, run_loop.QuitClosure()); | 174 UninstallView* view = new UninstallView(&result, run_loop.QuitClosure()); |
175 views::Widget::CreateWindow(view)->Show(); | 175 views::Widget::CreateWindow(view)->Show(); |
176 run_loop.Run(); | 176 run_loop.Run(); |
177 return result; | 177 return result; |
178 } | 178 } |
179 | 179 |
180 } // namespace chrome | 180 } // namespace chrome |
OLD | NEW |