| 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 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/ui/browser_list.h" | 24 #include "chrome/browser/ui/browser_list.h" |
| 25 #include "chrome/browser/ui/views/uninstall_view.h" | 25 #include "chrome/browser/ui/views/uninstall_view.h" |
| 26 #include "chrome/common/chrome_constants.h" | 26 #include "chrome/common/chrome_constants.h" |
| 27 #include "chrome/common/chrome_result_codes.h" | 27 #include "chrome/common/chrome_result_codes.h" |
| 28 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
| 29 #include "chrome/common/env_vars.h" | 29 #include "chrome/common/env_vars.h" |
| 30 #include "chrome/installer/util/browser_distribution.h" | 30 #include "chrome/installer/util/browser_distribution.h" |
| 31 #include "chrome/installer/util/helper.h" | 31 #include "chrome/installer/util/helper.h" |
| 32 #include "chrome/installer/util/install_util.h" | 32 #include "chrome/installer/util/install_util.h" |
| 33 #include "chrome/installer/util/shell_util.h" | 33 #include "chrome/installer/util/shell_util.h" |
| 34 #include "content/common/main_function_params.h" | 34 #include "content/public/common/main_function_params.h" |
| 35 #include "grit/chromium_strings.h" | 35 #include "grit/chromium_strings.h" |
| 36 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 38 #include "ui/base/message_box_win.h" | 38 #include "ui/base/message_box_win.h" |
| 39 #include "views/focus/accelerator_handler.h" | 39 #include "views/focus/accelerator_handler.h" |
| 40 #include "views/widget/widget.h" | 40 #include "views/widget/widget.h" |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 typedef HRESULT (STDAPICALLTYPE* RegisterApplicationRestartProc)( | 44 typedef HRESULT (STDAPICALLTYPE* RegisterApplicationRestartProc)( |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 if (!ShellUtil::RemoveChromeQuickLaunchShortcut(dist, | 129 if (!ShellUtil::RemoveChromeQuickLaunchShortcut(dist, |
| 130 ShellUtil::CURRENT_USER)) | 130 ShellUtil::CURRENT_USER)) |
| 131 VLOG(1) << "Failed to delete quick launch shortcut."; | 131 VLOG(1) << "Failed to delete quick launch shortcut."; |
| 132 } | 132 } |
| 133 return ret; | 133 return ret; |
| 134 } | 134 } |
| 135 | 135 |
| 136 // ChromeBrowserMainPartsWin --------------------------------------------------- | 136 // ChromeBrowserMainPartsWin --------------------------------------------------- |
| 137 | 137 |
| 138 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( | 138 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( |
| 139 const MainFunctionParams& parameters) | 139 const content::MainFunctionParams& parameters) |
| 140 : ChromeBrowserMainParts(parameters) { | 140 : ChromeBrowserMainParts(parameters) { |
| 141 } | 141 } |
| 142 | 142 |
| 143 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { | 143 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { |
| 144 if (!parameters().ui_task) { | 144 if (!parameters().ui_task) { |
| 145 // Make sure that we know how to handle exceptions from the message loop. | 145 // Make sure that we know how to handle exceptions from the message loop. |
| 146 InitializeWindowProcExceptions(); | 146 InitializeWindowProcExceptions(); |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); | 270 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); |
| 271 uninstall_cmd.AppendSwitch( | 271 uninstall_cmd.AppendSwitch( |
| 272 installer::switches::kDoNotRemoveSharedItems); | 272 installer::switches::kDoNotRemoveSharedItems); |
| 273 base::LaunchProcess(uninstall_cmd, base::LaunchOptions(), NULL); | 273 base::LaunchProcess(uninstall_cmd, base::LaunchOptions(), NULL); |
| 274 } | 274 } |
| 275 return true; | 275 return true; |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 return false; | 278 return false; |
| 279 } | 279 } |
| OLD | NEW |