| 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/chrome_browser_main_win.h" | 5 #include "chrome/browser/chrome_browser_main_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 &ignore); | 90 &ignore); |
| 91 | 91 |
| 92 RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime", | 92 RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime", |
| 93 base::Time::Now() - base::Time::FromFileTime(creation_time)); | 93 base::Time::Now() - base::Time::FromFileTime(creation_time)); |
| 94 } | 94 } |
| 95 | 95 |
| 96 int AskForUninstallConfirmation() { | 96 int AskForUninstallConfirmation() { |
| 97 int ret = content::RESULT_CODE_NORMAL_EXIT; | 97 int ret = content::RESULT_CODE_NORMAL_EXIT; |
| 98 views::Widget::CreateWindow(new UninstallView(&ret))->Show(); | 98 views::Widget::CreateWindow(new UninstallView(&ret))->Show(); |
| 99 views::AcceleratorHandler accelerator_handler; | 99 views::AcceleratorHandler accelerator_handler; |
| 100 MessageLoopForUI::current()->Run(&accelerator_handler); | 100 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); |
| 101 return ret; | 101 return ret; |
| 102 } | 102 } |
| 103 | 103 |
| 104 void ShowCloseBrowserFirstMessageBox() { | 104 void ShowCloseBrowserFirstMessageBox() { |
| 105 const string16 text = l10n_util::GetStringUTF16(IDS_UNINSTALL_CLOSE_APP); | 105 const string16 text = l10n_util::GetStringUTF16(IDS_UNINSTALL_CLOSE_APP); |
| 106 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 106 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
| 107 const UINT flags = MB_OK | MB_ICONWARNING | MB_TOPMOST; | 107 const UINT flags = MB_OK | MB_ICONWARNING | MB_TOPMOST; |
| 108 ui::MessageBox(NULL, text, caption, flags); | 108 ui::MessageBox(NULL, text, caption, flags); |
| 109 } | 109 } |
| 110 | 110 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 const MainFunctionParams& parameters) | 277 const MainFunctionParams& parameters) |
| 278 : ChromeBrowserMainParts(parameters) { | 278 : ChromeBrowserMainParts(parameters) { |
| 279 } | 279 } |
| 280 | 280 |
| 281 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { | 281 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { |
| 282 if (!parameters().ui_task) { | 282 if (!parameters().ui_task) { |
| 283 // Make sure that we know how to handle exceptions from the message loop. | 283 // Make sure that we know how to handle exceptions from the message loop. |
| 284 InitializeWindowProcExceptions(); | 284 InitializeWindowProcExceptions(); |
| 285 } | 285 } |
| 286 } | 286 } |
| OLD | NEW |