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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 string16 UninstallView::GetItemAt(int index) { | 156 string16 UninstallView::GetItemAt(int index) { |
157 DCHECK_LT(index, static_cast<int>(browsers_->size())); | 157 DCHECK_LT(index, static_cast<int>(browsers_->size())); |
158 BrowsersMap::const_iterator i = browsers_->begin(); | 158 BrowsersMap::const_iterator i = browsers_->begin(); |
159 std::advance(i, index); | 159 std::advance(i, index); |
160 return i->first; | 160 return i->first; |
161 } | 161 } |
162 | 162 |
163 namespace chrome { | 163 namespace chrome { |
164 | 164 |
165 int ShowUninstallBrowserPrompt(bool show_delete_profile) { | 165 int ShowUninstallBrowserPrompt(bool show_delete_profile) { |
166 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 166 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); |
167 int result = content::RESULT_CODE_NORMAL_EXIT; | 167 int result = content::RESULT_CODE_NORMAL_EXIT; |
168 views::AcceleratorHandler accelerator_handler; | 168 views::AcceleratorHandler accelerator_handler; |
169 base::RunLoop run_loop(&accelerator_handler); | 169 base::RunLoop run_loop(&accelerator_handler); |
170 UninstallView* view = new UninstallView(&result, | 170 UninstallView* view = new UninstallView(&result, |
171 run_loop.QuitClosure(), | 171 run_loop.QuitClosure(), |
172 show_delete_profile); | 172 show_delete_profile); |
173 views::Widget::CreateWindow(view)->Show(); | 173 views::Widget::CreateWindow(view)->Show(); |
174 run_loop.Run(); | 174 run_loop.Run(); |
175 return result; | 175 return result; |
176 } | 176 } |
177 | 177 |
178 } // namespace chrome | 178 } // namespace chrome |
OLD | NEW |